blob: dca0207d1e6485082bb6711ea4766676373e2b79 (
plain)
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
|
#!/usr/bin/make -f
# rules to package gutenprint
# $Id: rules,v 1.58 2005/06/26 17:06:59 rleigh Exp $
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
# Use dpatch.
include /usr/share/dpatch/dpatch.make
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
# Get upstream version, and define libgutenprint suffix
#UPSTREAM_VERSION = $(shell dpkg-parsechangelog | grep ^Version | sed "s/.* //" | sed "s/-[^-]*$$//")
UPSTREAM_VERSION = 5.0.0-rc2
UPSTREAM_VERSION_COMPACT = $(shell echo '$(UPSTREAM_VERSION)' | sed "s/\(.*\..*\)\..*/\1/"
#LIBRARY_VERSION = -$(UPSTREAM_VERSION)
LIBRARY_VERSION = 2
LIBRARYUI_VERSION = 1
GENERATED_FILES = \
debian/libgutenprint2.install
autoconfigure: autoconfigure-stamp
autoconfigure-stamp: debian/control $(GENERATED_FILES)
dh_testdir
mkdir debian/build; \
cd debian/build; \
../../configure --host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr --mandir=\$${prefix}/share/man \
--disable-static --enable-shared --disable-rpath \
--with-modules=dlopen \
--enable-libgutenprintui --enable-libgutenprintui2 \
--without-gimp --with-gimp2 --with-cups --with-ijs \
--with-foomatic --with-foomatic3 \
--disable-test \
--enable-cups-level3-ppds --disable-translated-cups-ppds \
--disable-cups-level3-ps --disable-static-genppd
touch autoconfigure-stamp
build: build-stamp debian/control
build-stamp: patch-stamp autoconfigure-stamp
dh_testdir
cd debian/build; \
$(MAKE)
touch build-stamp
clean: realclean unpatch
realclean: debian/control
dh_testdir
rm -f build-stamp autoconfigure-stamp
-$(MAKE) distclean
-test -r /usr/share/misc/config.sub && \
cp -f /usr/share/misc/config.sub scripts/config.sub
-test -r /usr/share/misc/config.guess && \
cp -f /usr/share/misc/config.guess scripts/config.guess
rm -rf debian/build debian/install
-$(MAKE) distclean
rm -f $(GENERATED_FILES)
dh_clean
install: DH_OPTIONS=
install: build debian/control
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
cd debian/build; \
$(MAKE) DESTDIR=`pwd`/../install install
dh_install
# Build architecture-independent files here.
binary-indep: build install
dh_testdir -i
dh_testroot -i
dh_installdocs -i
dh_installexamples -i
dh_installchangelogs -i NEWS
dh_link -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir -a
dh_testroot -a
dh_installdocs -a
cp src/cups/README debian/cupsys-driver-gutenprint/usr/share/doc/cupsys-driver-gutenprint/README.cups
mv debian/cupsys-driver-gutenprint/usr/share/man/man8/cups-genppd.8 debian/cupsys-driver-gutenprint/usr/share/man/man8/cups-genppd.5.0.8
mv debian/cupsys-driver-gutenprint/usr/share/man/man8/cups-genppdconfig.8 debian/cupsys-driver-gutenprint/usr/share/man/man8/cups-genppdconfig.5.0.8
mv debian/cupsys-driver-gutenprint/usr/share/man/man8/cups-genppdupdate.8 debian/cupsys-driver-gutenprint/usr/share/man/man8/cups-genppdupdate.5.0.8
mv debian/ijsgutenprint/usr/share/man/man1/ijsgutenprint.1 debian/ijsgutenprint/usr/share/man/man1/ijsgutenprint.5.0.1
ln -s ijsgutenprint.5.0.1.gz debian/ijsgutenprint/usr/share/man/man1/ijsgutenprint.1.gz
ln -s ijsgutenprint.5.0 debian/ijsgutenprint/usr/bin/ijsgutenprint
dh_installexamples -a
dh_installchangelogs -a NEWS
dh_strip -a
dh_link -a
dh_compress -a
dh_fixperms -a
# Strip DT_RPATH from CUPS binaries.
find debian/cupsys-driver-gutenprint/usr/lib -type f -perm +0111 -print0 | xargs -0 chrpath --delete
chrpath --delete debian/cupsys-driver-gutenprint/usr/sbin/cups-genppd.5.0
dh_makeshlibs -a -V -X usr/lib/gutenprint
dh_installdeb -a
dh_shlibdeps -a -X usr/lib/gutenprint -l$(CURDIR)/debian/libgutenprint$(LIBRARY_VERSION)/usr/lib:$(CURDIR)/debian/libgutenprintui1-$(LIBRARYUI_VERSION)/usr/lib:$(CURDIR)/debian/libgutenprintui2-$(LIBRARYUI_VERSION)/usr/lib
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
SEDPATTERN = -e "s/\#UPSTREAM_VERSION\#/$(UPSTREAM_VERSION)/g" -e "s/\#LIBRARY_VERSION\#/$(LIBRARY_VERSION)/g" -e "s/\#LIBRARYUI_VERSION\#/$(LIBRARYUI_VERSION)/g"
debian/control: debian/control.in debian/changelog debian/rules
sed $(SEDPATTERN) <$< >$@
debian/libgutenprint2.install: debian/libgutenprint2.install.in debian/changelog
sed $(SEDPATTERN) <$< >$@
.PHONY: build clean binary-indep binary-arch binary install autoconfigure patch unpatch
|