/
builddeb.sh
25 lines (24 loc) · 976 Bytes
/
builddeb.sh
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
#!/bin/bash
cd ../
#rm -rf web
#rm -f TODO
rm -rf debian
mkdir -p debian/usr/
mkdir -p debian/usr/share/doc/macs
mkdir -p debian/DEBIAN/
cp DEBIAN/control debian/DEBIAN/
cp DEBIAN/copyright debian/usr/share/doc/macs
mkdir -p debian/usr/share/man/man1/
makeinfo DEBIAN/macs.texi
info2man DEBIAN/macs.info
cp DEBIAN/macs.man debian/usr/share/man/man1/macs14.1
gzip --best debian/usr/share/man/man1/macs14.1
gzip --best -c DEBIAN/changelog > debian/usr/share/doc/macs/changelog.gz
echo "MACS Debian maintainer and upstream author are identical.\nTherefore see also normal changelog file for Debian changes." > debian/usr/share/doc/macs/changelog.Debian
gzip --best debian/usr/share/doc/macs/changelog.Debian
python setup.py install --prefix=debian/usr/ --install-layout=deb
#for f in `ls debian/usr/bin/*.py`;do mv ${f} ${f/.py/};done
for f in `find debian/usr/lib/ -name '*.pyc'`;do rm -f ${f};done
fakeroot dpkg-deb --build debian
mv debian.deb macs_1.4.2.deb
echo "finished!"