From 01e2213159c465cd5a3c1fd9cb3d02d82aa26b50 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 26 Jan 2023 08:11:11 -0600 Subject: [PATCH] add rules to package flutter Signed-off-by: Jeff Carr --- flutter-source-build/Makefile | 65 ++++++++++++++++++++++++++++++ flutter-source-build/control | 14 +++++++ flutter-source-build/debian-binary | 1 + flutter-source-build/postinst | 1 + flutter-source-build/preinst | 3 ++ flutter/Makefile | 65 ++++++++++++++++++++++++++++++ flutter/control | 14 +++++++ flutter/debian-binary | 1 + flutter/postinst | 1 + flutter/preinst | 3 ++ 10 files changed, 168 insertions(+) create mode 100644 flutter-source-build/Makefile create mode 100644 flutter-source-build/control create mode 100644 flutter-source-build/debian-binary create mode 100755 flutter-source-build/postinst create mode 100755 flutter-source-build/preinst create mode 100644 flutter/Makefile create mode 100644 flutter/control create mode 100644 flutter/debian-binary create mode 100755 flutter/postinst create mode 100755 flutter/preinst diff --git a/flutter-source-build/Makefile b/flutter-source-build/Makefile new file mode 100644 index 0000000..d9ee880 --- /dev/null +++ b/flutter-source-build/Makefile @@ -0,0 +1,65 @@ +.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 diff --git a/flutter-source-build/control b/flutter-source-build/control new file mode 100644 index 0000000..6b5289a --- /dev/null +++ b/flutter-source-build/control @@ -0,0 +1,14 @@ +Package: flutter-source-build +Source: flutter-source-build +Architecture: amd64 +Maintainer: Jeff Carr +Installed-Size: 5883 +Section: development +Priority: optional +Homepage: https://flutter.dev/ +Description: flutter-source-build + Raw build from git repo + . + Files moved to be stored in /opt/flutter/ + . + This packaging is simple. It is just the default build. diff --git a/flutter-source-build/debian-binary b/flutter-source-build/debian-binary new file mode 100644 index 0000000..cd5ac03 --- /dev/null +++ b/flutter-source-build/debian-binary @@ -0,0 +1 @@ +2.0 diff --git a/flutter-source-build/postinst b/flutter-source-build/postinst new file mode 100755 index 0000000..1a24852 --- /dev/null +++ b/flutter-source-build/postinst @@ -0,0 +1 @@ +#!/bin/sh diff --git a/flutter-source-build/preinst b/flutter-source-build/preinst new file mode 100755 index 0000000..ad4f4d8 --- /dev/null +++ b/flutter-source-build/preinst @@ -0,0 +1,3 @@ +#!/bin/sh -x + +# Is there something that should be done here? diff --git a/flutter/Makefile b/flutter/Makefile new file mode 100644 index 0000000..058a321 --- /dev/null +++ b/flutter/Makefile @@ -0,0 +1,65 @@ +.PHONY: control + +TARBALL=~/tmp/flutter-3.7.0-1.5.pre.tgz +VERSION=3.7.0 +MINOR=1.5.pre +BASENAME=flutter + +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/ + cd ../files/ && tar xfz ${TARBALL} + +# 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 diff --git a/flutter/control b/flutter/control new file mode 100644 index 0000000..dff807c --- /dev/null +++ b/flutter/control @@ -0,0 +1,14 @@ +Package: flutter +Source: flutter +Architecture: amd64 +Maintainer: Jeff Carr +Installed-Size: 5883 +Section: development +Priority: optional +Homepage: https://flutter.dev/ +Description: flutter + Raw build from git repo + . + Files moved to be stored in /opt/flutter/bin/ + . + This packaging is simple. It is just the default build. diff --git a/flutter/debian-binary b/flutter/debian-binary new file mode 100644 index 0000000..cd5ac03 --- /dev/null +++ b/flutter/debian-binary @@ -0,0 +1 @@ +2.0 diff --git a/flutter/postinst b/flutter/postinst new file mode 100755 index 0000000..1a24852 --- /dev/null +++ b/flutter/postinst @@ -0,0 +1 @@ +#!/bin/sh diff --git a/flutter/preinst b/flutter/preinst new file mode 100755 index 0000000..ad4f4d8 --- /dev/null +++ b/flutter/preinst @@ -0,0 +1,3 @@ +#!/bin/sh -x + +# Is there something that should be done here?