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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
#!/usr/bin/make -f
build: build-stamp
build-stamp:
if [ ! -d debian ]; then exit 1; fi
./configure --i18n=1 --debug=0 --prefix=/usr --etcdir=/etc
$(MAKE) DESTDIR=`pwd`/debian/axel
touch build-stamp
clean:
if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
rm -rf build-stamp debian/axel debian/axel-kapt debian/*.substvars debian/files
-$(MAKE) distclean DESTDIR=`pwd`/debian/axel
install: build
if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
mkdir -p debian/axel/DEBIAN/
mkdir -p debian/axel-kapt/DEBIAN/
$(MAKE) install DESTDIR=`pwd`/debian/axel
$(MAKE) -C gui/kapt install DESTDIR=`pwd`/debian/axel-kapt
binary-indep: build install
if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
chmod 755 debian/axel-kapt.p*
# axel-kapt (all archs)
mkdir -p debian/axel-kapt/usr/share/doc/
ln -s axel debian/axel-kapt/usr/share/doc/axel-kapt
gzip -9 debian/axel-kapt/usr/share/man/man1/axel-kapt.1
install -D --mode=0644 debian/axel-kapt.menu debian/axel-kapt/usr/lib/menu/axel-kapt
cp debian/axel-kapt.postinst debian/axel-kapt/DEBIAN/postinst
cp debian/axel-kapt.postrm debian/axel-kapt/DEBIAN/postrm
cd debian/axel-kapt; \
find usr -type f -exec md5sum {} \; > DEBIAN/md5sums
dpkg-gencontrol -ldebian/changelog -isp -paxel-kapt -Pdebian/axel-kapt
dpkg --build debian/axel-kapt ..
binary-arch: build install
if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
chmod 755 debian/axel.p*
# axel
mkdir -p debian/axel/usr/share/doc/axel/examples/
cp CREDITS README debian/axel/usr/share/doc/axel/
cp axelrc.example debian/axel/usr/share/doc/axel/examples/
# (Copying to axel package because axel-kapt just symlinks to axel's docdir)
cp gui/kapt/axel-kapt.desktop debian/axel/usr/share/doc/axel/examples/
cp debian/changelog debian/axel/usr/share/doc/axel/changelog.Debian
cp debian/copyright debian/axel/usr/share/doc/axel/copyright
cp CHANGES debian/axel/usr/share/doc/axel/changelog
cd debian/axel/usr/share/; \
gzip -9 doc/axel/changelog doc/axel/changelog.Debian man/man1/axel.1
cp debian/axel.conffiles debian/axel/DEBIAN/conffiles
cp debian/axel.postinst debian/axel/DEBIAN/postinst
cp debian/axel.prerm debian/axel/DEBIAN/prerm
strip -R .comment -R .note debian/axel/usr/bin/axel
cd debian/axel; \
find usr -type f -exec md5sum {} \; > DEBIAN/md5sums
dpkg-shlibdeps -Tdebian/axel.substvars -dDepends debian/axel/usr/bin/axel
dpkg-gencontrol -ldebian/changelog -isp -paxel -Tdebian/axel.substvars -Pdebian/axel
dpkg --build debian/axel ..
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|