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 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
package=libjpeg
arch=$(shell dpkg --print-gnu-build-architecture)
#export DH_VERBOSE=1
build:
dh_testdir
CFLAGS="-D_REENTRANT -O2 -g -Wall" ./configure --prefix=/usr --enable-static --enable-shared
sed < libtool > libtool-2 \
-e 's/^hardcode_libdir_flag_spec.*$$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/' \
-e '/^archive_cmds="/s/"$$/ \\$$deplibs"/'
mv libtool-2 libtool
chmod 755 libtool
make
touch build
clean:
dh_testdir
dh_testroot
-rm -rf static shared
-rm -f build
-make clean
-rm -rf debian/tmp `find debian/* -type d ! -name CVS`
-rm -f debian/*substvars
-rm -f testimg.gif
dh_clean
binary-indep: build
# dh_testdir -i
# dh_testroot -i
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
binary-arch: build
dh_testdir -a
dh_testroot -a
-rm -rf debian/tmp `find debian/* -type d ! -name CVS`
dh_clean -a -k
dh_installdirs -a
#
# Install libc6 shared libraries and programs
#
install -d -m755 debian/install/usr/{include,bin,man/man1,lib}
$(MAKE) install prefix=`pwd`/debian/install/usr
# separate out lib package
install -m644 debian/install/usr/lib/libjpeg.so.62.0.0 debian/tmp/usr/lib/.
cp -a debian/install/usr/lib/libjpeg.so.62 debian/tmp/usr/lib/.
ln -s libjpeg.so.62.0.0 debian/tmp/usr/lib/libjpeg.so.6b
# separate out dev package
cp -a debian/install/usr/lib/libjpeg.so debian/libjpeg62-dev/usr/lib/.
install -m644 debian/install/usr/lib/libjpeg.a debian/libjpeg62-dev/usr/lib/.
install -m644 debian/install/usr/include/* debian/libjpeg62-dev/usr/include/.
# separate out -progs
install -m644 debian/install/usr/man/man1/* debian/libjpeg-progs/usr/man/man1/.
install -m755 debian/install/usr/bin/* debian/libjpeg-progs/usr/bin/.
#
#
# Install tests
#
install -d debian/libjpeg-progs/usr/doc/libjpeg-progs/tests
install debian/libjpeg-progs.test \
debian/libjpeg-progs/usr/doc/libjpeg-progs/tests/test
# No GIF image supplied, so create one --- this doesn't make for a
# very good test though :( Should really test it with another app
LD_LIBRARY_PATH=./.libs \
.libs/djpeg -dct int -gif -outfile testimg.gif testimg.jpg
install testimg.gif testimg.jpg testimg.ppm testimgp.jpg testorig.jpg \
testprog.jpg debian/libjpeg-progs/usr/doc/libjpeg-progs/tests
#
# Finish it off with debhelper
#
dh_installdocs -a README
dh_installexamples -a
# dh_installmanpages -a
dh_installchangelogs -a change.log
dh_strip -a
dh_compress -a
dh_fixperms -a
chmod 0755 debian/libjpeg-progs/usr/doc/libjpeg-progs/tests/test
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
# dh_makeshlibs -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: clean binary-indep binary-arch binary # build
|