-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_release.sh
More file actions
executable file
·53 lines (34 loc) · 1.15 KB
/
Copy pathbuild_release.sh
File metadata and controls
executable file
·53 lines (34 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
set -e
set -u
set -x
# Generates a collection of release tarballs
ARCH="$(uname -p)"
cd "$(dirname "$0")"
make clean
make build
mkdir -p ./release
VERSION="$(cat ./VERSION)"
RELEASENAME="herc-file-formats-$VERSION-$ARCH"
# create a generic tarball
cd build
tar cvfz "../release/$RELEASENAME.tar.gz" .
# now create a deb package
mkdir ./DEBIAN
mkdir ./usr
mv ./bin ./include ./lib ./man ./usr/
touch ./DEBIAN/conffiles # none, just need an empty file her
echo "Package: herc-file-formats" > ./DEBIAN/control
echo "Priority: extra" >> ./DEBIAN/control
echo "Section: checkinstall" >> ./DEBIAN/control # I have no idea what "Section" means, just cargo-culted it from an example
echo "Installed-Size: $(du -csh --block-size=1kB . | tail -n1 | awk '{print($1)}')" >> ./DEBIAN/control
echo "Maintainer: None" >> ./DEBIAN/control
echo "Architecture: amd64" >> ./DEBIAN/control
echo "Version: $VERSION" >> ./DEBIAN/control
echo "Provides: herc-file-formats" >> ./DEBIAN/control
echo "Description: HeRC Lab tools and libraries for file formats" >> ./DEBIAN/control
dpkg-deb -b ./
mv '..deb' "../release/$RELEASENAME.deb"
rm -rf ./DEBIAN
rm -rf ./usr
cd ..