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
|
#!/usr/bin/make -f
# -*- Makefile -*- debian/rules for xcftools
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatibility version to use.
export DH_COMPAT=4
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
# FOR AUTOCONF 2.52 AND NEWER ONLY
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
confflags += --build $(DEB_HOST_GNU_TYPE)
else
confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
OVERRIDES = SUPPRESS_AUTOFOO=yes
# The 'autotools' target makes sure that the files not in my cvs
# repository are up-to-date before building.
# Autogenerated files are remade only if they don't
# exist. Since they *are* in the .diff.gz, buildds will not run
# autoconf etc, but it does happen when cvs-buildpackage runs
# dpkg-buildpackage to create a fresh .diff.gz file.
autotools: autotools-stamp
autotools-stamp:
dh_testdir
-rm -f config.sub config.guess
cp /usr/share/misc/config.sub config.sub
cp /usr/share/misc/config.guess config.guess
( [ -f configure ] && [ -f config.hin ] ) \
|| ( aclocal && autoconf2.50 && autoheader )
$(RM) aclocal.m4
touch autotools-stamp
configure: configure-stamp
configure-stamp: autotools-stamp
./configure CFLAGS="$(CFLAGS)" $(confflags) \
--prefix=/usr --mandir=\$${prefix}/share/man
touch configure-stamp
build: configure-stamp
dh_testdir
$(MAKE) $(OVERRIDES) all
[ -f test-stamp ] || $(MAKE) check
touch test-stamp
clean: autotools-stamp
[ -z "`find -uid 0`" ] || dh_testroot
rm -f configure-stamp autotools-stamp test-stamp
-$(MAKE) $(OVERRIDES) distclean
dh_clean
install: build
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) $(OVERRIDES) prefix=debian/xcftools/usr install
binary-indep:
# There are no arch-independent pacakges here
binary-arch: install
echo misc:Depends= > debian/xcftools.substvars
dh_installchangelogs ChangeLog
dh_installdocs
dh_installmime
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
.PHONY: autotools
|