work outside the directory

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2023-01-26 07:06:14 -06:00
parent 4b112575e5
commit 915d067755
1 changed files with 15 additions and 10 deletions

View File

@ -8,18 +8,18 @@ BASENAME=android-studio
help:
@echo
@echo "make all # to attempt to download, extract and build the .deb package using dpkg"
@echo "make raw # to attempt to download, extract and build the .deb package using 'tar' and 'ar'"
@echo
all: download clean extract DEBIAN build
# uses 'ar' to make a .deb file
raw: download clean extract DEBIAN tar-ar
clean:
rm -rf files/opt files/DEBIAN/control
rm -f *.deb
rm -f control.tar.xz data.tar.xz
rm -rf files/DEBIAN DEBIAN
rm -rf ../files
rm -f ../*.deb
rm -f ../*.tar.xz data.tar.xz
rm -rf DEBIAN
download:
@echo
@ -29,8 +29,8 @@ download:
@echo
extract:
mkdir -p files/opt/
cd files/opt/ && tar xfz ${TARBALL}
mkdir -p ../files/opt/
cd ../files/opt/ && tar xfz ${TARBALL}
# makes the DEBIAN/ directory
DEBIAN:
@ -49,11 +49,16 @@ md5sum:
cd files/ && find -type f -exec md5sum '{}' \; |sort -k2 >../DEBIAN/md5sums
build:
mv DEBIAN files/
dpkg-deb --build files ${BASENAME}_${VERSION}.${MINOR}_amd64.deb
dpkg-deb --info ${BASENAME}_${VERSION}.${MINOR}_amd64.deb
mv DEBIAN ../files/
cd .. && dpkg-deb --build files ${BASENAME}_${VERSION}.${MINOR}_amd64.deb
cd .. && dpkg-deb --info ${BASENAME}_${VERSION}.${MINOR}_amd64.deb
# how to make a debian package "raw" just using tar and ar
#
# READ THIS AGAIN:
#
# A .deb file is just output from 'ar rcs'
#
tar-ar: control
cd DEBIAN && tar --ignore-failed-read -cvJf ../control.tar.xz .
cd files && tar -cvJf ../data.tar.xz .