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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
#!/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
version=6a.0.0
version_major=6a
arch=$(shell dpkg --print-gnu-build-architecture)
#export DH_VERBOSE=1
build:
dh_testdir
./configure --prefix=/usr
-mkdir shared{,g} static{,g}
#
# First build the shared library
#
cd sharedg ; \
$(MAKE) libjpeg.so -f ../Makefile VPATH=".." srcdir=".." \
CFLAGS="-O2 -D_REENTRANT -fPIC -pipe"
#
# Build the static library (it does not need Position Independent Code,
# which reserves one register; thus, without -fPIC we get more efficient
# code).
#
cd staticg ; \
$(MAKE) libjpeg.a -f ../Makefile VPATH=".." srcdir=".." \
CFLAGS="-O2 -D_REENTRANT -pipe" LDFLAGS="-s"
#
# Now do the same for the libc5 based builds.
# Shared libraries...
#
cd shared ; \
PATH=/usr/$(arch)-linuxlibc1/bin:/usr/local/bin:/usr/bin:/bin:$(PATH) \
$(MAKE) libjpeg.so -f ../Makefile VPATH=".." srcdir=".." \
CFLAGS="-O2 -D_REENTRANT -fPIC -pipe"
#
# The libc5 based static library...
#
cd static ; \
PATH=/usr/$(arch)-linuxlibc1/bin:/usr/local/bin:/usr/bin:/bin:$(PATH) \
$(MAKE) libjpeg.a -f ../Makefile VPATH=".." srcdir=".." \
CFLAGS="-O2 -D_REENTRANT -pipe" LDFLAGS="-s"
#
# Build the binaries both with and without gif support...
#
cd sharedg ; \
$(MAKE) progs -f ../Makefile VPATH=".." srcdir=".." \
CFLAGS="-O2 -pipe"
touch build
clean:
dh_testdir
dh_testroot
-rm -rf static{,g} shared{,g}
-rm -f build
-make clean
-rm -rf debian/tmp `find debian/* -type d ! -name CVS`
-rm -f debian/*substvars
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 -d debian/libjpeg-altdev/usr/$(arch)-linuxlibc1/lib \
debian/libjpeg-altdev/usr/$(arch)-linuxlibc1/include
#
# Install libc6 shared libraries and programs
#
cd sharedg ; \
$(MAKE) install-shlibg -f ../Makefile VPATH=".." srcdir=".." \
prefix=debian/tmp/usr ; \
$(MAKE) install -f ../Makefile VPATH=".." srcdir=".." \
prefix=debian/libjpeg-progs/usr ; \
$(MAKE) nfinstall -f ../Makefile VPATH=".." srcdir=".." \
prefix=debian/libjpeg-gif/usr
#
# Install the libc5 shared libraries
#
cd shared ; \
$(MAKE) install-shlib -f ../Makefile VPATH=".." srcdir=".." \
prefix=debian/libjpeg6a/usr/lib/libc5-compat ; \
#
# Install libc6 development files
#
cd staticg ; \
$(MAKE) install-libg -f ../Makefile VPATH=".." srcdir=".." \
prefix=debian/libjpegg-dev/usr
#
# Install libc5 (alternate) development files
#
cd static ; \
$(MAKE) install-lib -f ../Makefile VPATH=".." srcdir=".." \
prefix='debian/libjpeg-altdev/usr/$(arch)-linuxlibc1'
#
# Link the shared libraries appropriately
#
cd debian/tmp/usr/lib ; \
ln -sf $(package).so.$(version) $(package).so.$(version_major)
cd debian/libjpeg6a/usr/lib/libc5-compat ; \
ln -sf $(package).so.$(version) $(package).so.$(version_major)
cd debian/libjpegg-dev/usr/lib ; \
ln -sf $(package).so.$(version) $(package).so
cd debian/libjpeg-altdev/usr/$(arch)-linuxlibc1/lib ; \
ln -sf ../../lib/libc5-compat/$(package).so.$(version) $(package).so
#
# 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
install testimg.gif testimg.jpg testimg.ppm testimgp.jpg testorig.jpg \
testprog.jpg debian/libjpeg-progs/usr/doc/libjpeg-progs/tests
install -d debian/libjpeg-gif/usr/doc/libjpeg-gif/tests
install debian/libjpeg-gif.test \
debian/libjpeg-gif/usr/doc/libjpeg-gif/tests/test
install testimg.gif testimg.jpg testimg.ppm testimgp.jpg testorig.jpg \
testprog.jpg debian/libjpeg-gif/usr/doc/libjpeg-gif/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
chmod 0755 debian/libjpeg-gif/usr/doc/libjpeg-gif/tests/test
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
# dh_makeshlibs -a
dh_du -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
|