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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DEB_BUILD_MAINT_OPTIONS=hardening=+all
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildflags.mk
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
BUILD_SYSTEM = --build $(DEB_BUILD_GNU_TYPE)
else
BUILD_SYSTEM = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
CFLAGS += -Wall
LDFLAGS += -Wl,-z,defs
CONFIG_OPTIONS = --with-xkb --with-xrandr --enable-mdoc
ifneq (,$(filter ratpoison:gendeps,$(DEB_BUILD_OPTIONS)))
CONFIG_OPTIONS +=
else
CONFIG_OPTIONS += --disable-dependency-tracking
endif
ifneq (,$(filter ratpoison:noxft,$(DEB_BUILD_OPTIONS)))
CONFIG_OPTIONS += --without-xft
else
CONFIG_OPTIONS += --with-xft
endif
ifneq (,$(filter ratpoison:readline,$(DEB_BUILD_OPTIONS)))
CONFIG_OPTIONS += --enable-history
else
CONFIG_OPTIONS += --disable-history
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif
autoreconf-stamp: configure.ac Makefile.am src/Makefile.am contrib/Makefile.am doc/Makefile.am
dh_testdir
autoreconf -i
touch autoreconf-stamp
config.status: autoreconf-stamp
dh_testdir
./configure $(BUILD_SYSTEM) \
--prefix=/usr --sysconfdir=/etc \
--mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \
--with-xterm=x-terminal-emulator \
--with-menu="/etc/X11/ratpoison/ratpoisonmenu debian.menu" \
$(CONFIG_OPTIONS) \
--x-includes="" --x-libraries="" \
CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)'
# do not delete config.status if above rule failed,
# as that might hide other left over files that need cleaning
.PRECIOUS: config.status
build-arch: build-arch-stamp
build-arch-stamp: config.status
dh_testdir
$(MAKE)
# bindings for the different languages
unset RATPOISON ; cd contrib && ./genrpbindings
# manpage for rpws
pod2man contrib/rpws rpws.1
touch build-arch-stamp
build-indep: build-indep-stamp
build-indep-stamp:
touch build-indep-stamp
build: build-arch build-indep
clean:
dh_testdir
dh_testroot
rm -f build-arch-stamp build-indep-stamp autoreconf-stamp
if [ -e config.status ] ; then $(MAKE) maintainer-clean ; fi
rm -f m4/pkg.m4
! test -f config.log
-rm -f contrib/Ratpoison.pm contrib/ratpoison-cmd.el contrib/ratpoison.lisp contrib/ratpoison.py contrib/ratpoison.rb m4/package.m4
-rm -rf build-aux
-rm -f rpws.1
-rm -f config.sub config.guess
dh_clean
# Build architecture-independent files
binary-indep: build-indep-stamp
# We have nothing to do
# Build architecture-dependent files
binary-arch: build-arch-stamp
dh_testdir
dh_testroot
dh_prep
dh_installdirs
$(MAKE) install pkgdatadir=/usr/share/doc/ratpoison/examples DESTDIR=$(CURDIR)/debian/ratpoison
sed -e 's%^#!/usr/bin/env perl$$%#!/usr/bin/perl%' -i debian/ratpoison/usr/bin/rpws
# since Debian uses gnu install-info, this seems to need manual removing...
find debian/ratpoison -name "dir" -print -delete
# Those are installed to different places already by dh_*
rm debian/ratpoison/usr/share/doc/ratpoison/COPYING
# not needed two times:
rm debian/ratpoison/usr/share/doc/ratpoison/examples/rpws
# The menu command:
install -D -m 0755 debian/callmenu.sh debian/ratpoison/etc/X11/ratpoison/ratpoisonmenu
dh_install
dh_installchangelogs ChangeLog
dh_installdocs
dh_installexamples
dh_installemacsen
dh_installmenu
dh_installinfo doc/ratpoison.info
dh_installman rpws.1
dh_link
dh_strip
dh_compress
find debian/ratpoison -name "dir.gz" -print -delete
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build-arch build-indep build clean binary-indep binary-arch binary maintainer-clean maintainer-unclean
|