-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
52 lines (46 loc) · 1.93 KB
/
Makefile
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
PATH := $(PATH):/usr/local/sbin:/usr/sbin:/sbin
gorg64:
cd src && $(MAKE)
clean:
cd src && $(MAKE) clean
-rm -f gorg64*.deb
-rm -r -f ./usr
source:
dpkg-source -b .
archive:
fpc -Cg -k-pie -k-znow -O4 -CX -XX ver.pas
-rm -f ver.o
-sstrip ver
./ver ar
install:
dpkg -i gorg64_2.0.0-1_amd64.deb
deb:
-rm -r -f usr
-mkdir -m =00755 ./usr/ ./usr/bin/ ./usr/share/ ./usr/share/doc/ ./usr/share/doc/gorg64/ ./usr/share/applications/ ./usr/share/man/ ./usr/share/man/man1/ ./usr/share/pixmaps/ ./usr/share/man/ru/ ./usr/share/man/ru/man1/
cp ./src/gorg64 ./src/gorg64_spkplay ./src/gorg64_spktone ./src/gorg64_spkon ./src/gorg64_spkoff ./src/gorg64_runner ./usr/bin/
strip ./usr/bin/*
cp ./debian/*.desktop ./usr/share/applications/
cp ./debian/*.png ./usr/share/pixmaps/
cp ./debian/copyright ./usr/share/doc/gorg64/
cp ./lang_s/*.txt ./usr/share/doc/gorg64/
gzip -n -9 -c ./debian/changelog > ./usr/share/doc/gorg64/changelog.gz
tar -c --xz sound music script > ./usr/share/doc/gorg64/files.tar.xz
find ./man/ -maxdepth 1 -name "*.1" -type f -exec gzip -f -n -9 -k '{}' \;
mv ./man/*.1.gz ./usr/share/man/man1/
find ./usr/ -type d -exec chmod =00755 '{}' \;
find ./usr/ -type f -exec chmod =00644 '{}' \;
find usr/ -type f -exec md5sum \{\} \; > md5sums
chmod =00644 md5sums usr/share/doc/gorg64/* usr/share/man/man1/*
chmod =00755 usr/bin/* debian/post*
chmod =00644 ./debian/control
-rm -f control.tar.xz data.tar.zst data.tar.xz data.tar data.tar.bz2
cd debian && tar -c --owner=root --group=root -f ../control.tar postinst postrm control ../md5sums
xz -e control.tar
tar -c --owner=root --group=root -f data.tar usr
xz -e data.tar
-rm -r -f usr
-rm -f gorg64_2.0.0-1_amd64.deb
mv control.tar.xz data.tar.xz ./debian/
cd debian && ar q ../gorg64_2.0.0-1_amd64.deb debian-binary control.tar.xz data.tar.xz
-rm -f ./debian/control.tar.xz ./debian/data.tar.xz data.tar md5sums
-lintian --tag-display-limit 0 gorg64_2.0.0-1_amd64.deb