66 lines
1.4 KiB
Makefile
66 lines
1.4 KiB
Makefile
.PHONY: control
|
|
|
|
SOURCE=~/tmp/flutter
|
|
VERSION=3.7.0
|
|
MINOR=git
|
|
BASENAME=flutter-source-build
|
|
|
|
help:
|
|
@echo
|
|
@echo "make all # to attempt to download, extract and build the .deb package using dpkg"
|
|
@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
|
|
rm -f ../*.deb
|
|
rm -f ../*.tar.xz data.tar.xz
|
|
rm -rf DEBIAN
|
|
|
|
download:
|
|
@echo
|
|
@echo CHECK FOR NEW VERSION via 'git tags'
|
|
@echo
|
|
|
|
extract:
|
|
mkdir -p ../files/opt/
|
|
cd ../files/opt/ && cp -a ${SOURCE} .
|
|
|
|
# makes the DEBIAN/ directory
|
|
DEBIAN:
|
|
mkdir -p DEBIAN
|
|
make md5sum
|
|
make control
|
|
cp preinst DEBIAN
|
|
cp postinst DEBIAN
|
|
|
|
control:
|
|
mkdir -p DEBIAN
|
|
cp control DEBIAN/
|
|
echo Version: ${VERSION}.${MINOR} >>DEBIAN/control
|
|
|
|
md5sum:
|
|
cd ../files/ && find -type f -exec md5sum '{}' \; |sort -k2 >../md5sums
|
|
mv ../md5sums DEBIAN/
|
|
|
|
build:
|
|
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 .
|
|
ar rcs ${BASENAME}_${VERSION}.${MINOR}_amd64.deb debian-binary control.tar.xz data.tar.xz
|
|
dpkg-deb --info ${BASENAME}_${VERSION}.${MINOR}_amd64.deb
|