File: rules

package info (click to toggle)
libjpeg6b 1:6b2-3
  • links: PTS
  • area: main
  • in suites: sid
  • size: 3,656 kB
  • ctags: 3,059
  • sloc: ansic: 20,892; sh: 12,688; asm: 284; makefile: 147
file content (90 lines) | stat: -rwxr-xr-x 2,641 bytes parent folder | download
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
#!/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.
#export DH_VERBOSE=1

package=libjpeg

export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

export LDFLAGS=-Wl,-z,relro
export CFLAGS=-g -Wall -Wno-main
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif

export AUTOMAKE = automake-1.11
export ACLOCAL = aclocal-1.11
export AUTOHEADER = true

build: build-stamp 
build-stamp:
	dh_testdir
	dh_autoreconf
	./configure --prefix=/usr --mandir=/usr/share/man \
         --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
	 --enable-static --enable-shared --enable-maxmem=1024 \
	 --disable-silent-rules \
	 --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) 
	$(MAKE) DESTDIR=debian/tmp
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	$(MAKE) test
endif
	touch build-stamp

clean: 
	dh_testdir
	dh_testroot
	-rm -f build-stamp stamp-h1
	if [ -f Makefile ]; then $(MAKE) clean; fi
	-rm -f Makefile jconfig.h config.log config.status  libtool
	dh_autoreconf_clean
	dh_clean

binary-indep: 

binary-arch: build
	dh_testdir 
	dh_testroot 
	dh_prep
	dh_installdirs 
	mkdir --parents debian/tmp/usr/bin \
	                debian/tmp/usr/lib \
			debian/tmp/usr/include \
			debian/tmp/usr/share/man/man1
	$(MAKE) install \
		prefix=`pwd`/debian/tmp/usr \
		libdir=`pwd`/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) \
		mandir=`pwd`/debian/tmp/usr/share/man/man1
#<ballombe@debian.org>:mjpegtools require this file to build and header say:
# * These declarations are considered internal to the JPEG library; most
# * applications using the library shouldn't need to include this file.
# So it is not forbidden to use it, therefore it must be installed.
	install -m644 jpegint.h debian/tmp/usr/include
	# fix jconfig.h 
	rm debian/tmp/usr/include/jconfig.h
	mkdir debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)
	sed -e "s/#\(undef\|define\) HAVE_STD\(DEF\|LIB\)_H 1//g" \
		jconfig.h > debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/jconfig.h
	# separate out lib package
	dh_movefiles
	# Finish it off with debhelper
	dh_installdocs README README.6b2
	dh_installexamples 
	dh_installchangelogs change.log
	dh_strip --dbgsym-migration=libjpeg62-dbg
	dh_compress 
	dh_fixperms 
	dh_makeshlibs -V'libjpeg62 (>=6b1)'
	dh_shlibdeps -l`pwd`/debian/libjpeg6b/usr/lib/$(DEB_HOST_MULTIARCH)
	dh_installdeb 
	dh_gencontrol 
	dh_md5sums 
	dh_builddeb 

binary:	binary-indep binary-arch

.PHONY: clean binary-indep binary-arch binary build