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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
#export DH_VERBOSE=1
PROGRAMS = rubik skewb dino pyraminx oct mball cubes triangles hexagons mlink barrel panex
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CONFIGURE_FLAGS := --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr --bindir=\$${prefix}/games --mandir=\$${prefix}/share/man \
--with-x --with-xpm --without-rplay --without-esound --without-nas
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
build:
true
build-motif-stamp:
dh_testdir
for PROG in $(PROGRAMS) ; do \
set -e ; \
cd $$PROG ; \
# use up to date config.{sub,guess} from autotools-dev \
ln -sf /usr/share/misc/config.sub . ; \
ln -sf /usr/share/misc/config.guess . ; \
CFLAGS="$(CFLAGS)" ./configure $(CONFIGURE_FLAGS) --with-motif --enable-xm-prefix ; \
$(MAKE) ; \
cd .. ; \
done
touch $@
build-nomotif-stamp:
dh_testdir
$(MAKE) -f xpuzzles.Makefile distclean
for PROG in $(PROGRAMS) ; do \
set -e ; \
cd $$PROG ; \
CFLAGS="$(CFLAGS)" ./configure $(CONFIGURE_FLAGS) --without-motif ; \
$(MAKE) ; \
cd .. ; \
done
touch $@
clean:
dh_testdir
dh_testroot
$(MAKE) -f xpuzzles.Makefile distclean
dh_clean build-motif-stamp build-nomotif-stamp debian/*.menu debian/*links
$(RM) -r debian/xdesktop debian/xmdesktop
# remove outdated config.{sub,guess}
find \( -name config.sub -o -name config.guess \) -print0 | xargs -0 -r rm -f \;
install: install-motif-stamp install-nomotif-stamp
for INFIX in '' m ; do \
set -e ; \
DOCDIR=$(CURDIR)/debian/x$${INFIX}puzzles/usr/share/doc/x$${INFIX}puzzles ; \
PIXDIR=$(CURDIR)/debian/x$${INFIX}puzzles/usr/share/pixmaps ; \
install -D -m 0644 xpuzzles.README $$DOCDIR/README ; \
echo -n "" > debian/x$${INFIX}puzzles.menu; \
mkdir -p $(CURDIR)/debian/x$${INFIX}desktop; \
for PROG in $(PROGRAMS) ; do \
install -D -m 0644 $$PROG/README $$DOCDIR/x$$INFIX$$PROG.README ; \
install -D -m 0644 $$PROG/pixmaps/$$PROG.t.xpm $$PIXDIR/x$$PROG.t.xpm ; \
install -D -m 0644 $$PROG/pixmaps/$$PROG.m.xpm $$PIXDIR/x$$PROG.m.xpm ; \
echo '?package(x'$$INFIX'puzzles): needs="X11" \' >> debian/x$${INFIX}puzzles.menu ; \
echo ' section="Games/Puzzles" title="'x$$INFIX$$PROG'" \' >> debian/x$${INFIX}puzzles.menu ; \
echo ' command="/usr/games/x'$$INFIX$$PROG'" \' >> debian/x$${INFIX}puzzles.menu ; \
echo ' icon="/usr/share/pixmaps/x'$$PROG'.m.xpm"' >> debian/x$${INFIX}puzzles.menu ; \
echo '[Desktop Entry]' > debian/x$${INFIX}desktop/x$${INFIX}$$PROG.desktop ; \
echo 'Name=x'$$INFIX$$PROG'' >> debian/x$${INFIX}desktop/x$${INFIX}$$PROG.desktop ; \
echo 'GenericName='$$PROG' game' >> debian/x$${INFIX}desktop/x$${INFIX}$$PROG.desktop ; \
echo 'Exec=/usr/games/x'$$INFIX$$PROG'' >> debian/x$${INFIX}desktop/x$${INFIX}$$PROG.desktop ; \
echo 'Icon=/usr/share/pixmaps/x'$$PROG'.m.xpm' >> debian/x$${INFIX}desktop/x$${INFIX}$$PROG.desktop ; \
echo 'Terminal=false' >> debian/x$${INFIX}desktop/x$${INFIX}$$PROG.desktop ; \
echo 'Type=Application' >> debian/x$${INFIX}desktop/x$${INFIX}$$PROG.desktop ; \
echo 'Categories=Game;' >> debian/x$${INFIX}desktop/x$${INFIX}$$PROG.desktop ; \
done ; \
mkdir -p $(CURDIR)/debian/x$${INFIX}puzzles/usr/share/applications; \
cp debian/x$${INFIX}desktop/*.desktop $(CURDIR)/debian/x$${INFIX}puzzles/usr/share/applications; \
done
install-motif-stamp: build-motif-stamp
dh_testroot
for PROG in $(PROGRAMS) ; do \
set -e ; \
cd $$PROG ; \
$(MAKE) install DESTDIR=$(CURDIR)/debian/xmpuzzles xapploaddir=/etc/X11/app-defaults ; \
cd .. ; \
echo 'usr/share/man/man6/x'$$PROG'.6.gz usr/share/man/man6/xm'$$PROG'.6.gz' >> debian/xmpuzzles.links ; \
done
install-nomotif-stamp: build-nomotif-stamp
dh_testroot
for PROG in $(PROGRAMS) ; do \
set -e ; \
cd $$PROG ; \
$(MAKE) install DESTDIR=$(CURDIR)/debian/xpuzzles xapploaddir=/etc/X11/app-defaults ; \
cd .. ; \
done
binary-indep: install
# We have nothing to do by default.
binary-arch: install
dh_testdir -a
dh_testroot -a
dh_install -a
dh_installdocs -a -A debian/README.Debian
dh_installmenu -a
dh_installman -a
dh_installchangelogs -a
dh_strip -a
dh_link -a
dh_compress -a
dh_fixperms -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
get-orig-source:
-uscan --force-download --repack --rename
binary: binary-indep binary-arch
build-arch: build
build-indep: build
.PHONY: build build-arch build-indep clean binary-indep binary-arch binary
|