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
|
#! /usr/bin/make -f
#
CC = gcc
CFLAGS = -O2 -g -Wall
LDFLAGS =
DEBDIR = debian/tmp/DEBIAN
BINDIR = debian/tmp/usr/games
MENUDIR = debian/tmp/usr/lib/menu
LIBDIR = debian/tmp/usr/lib/games/xconq
MANDIR = debian/tmp/usr/man
DOCDIR = debian/tmp/usr/doc/xconq
APPDIR = debian/tmp/usr/X11R6/lib/X11/app-defaults
VARDIR = debian/tmp/var/lib/games/xconq
DDEBDIR = debian/tmp-doc/DEBIAN
DXCONQDIR = debian/tmp-doc/usr/doc/xconq
DDOCDIR = debian/tmp-doc/usr/doc/xconq-doc
config:
$(checkdir)
./configure --with-xpm
touch stamp-config
build:
$(checkdir)
test -f stamp-config || make -f debian/rules config
make all-xconq CC="$(CC)" CFLAGS="$(CFLAGS)" \
datadir=/usr/lib/games/xconq \
X11_LIB_FLAGS="-Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib"
( cd doc && make html && make ps )
touch stamp-build
clean:
$(checkdir)
-( cd doc && rm *.html )
-make realclean
-rm -f stamp-config stamp-build
-rm -rf debian/tmp* debian/files debian/substvars
# generated files that were missed by xconq's realclean target
-rm doc/missfont.log
-rm -f `find . -name "*~"`
binary-arch: checkroot
$(checkdir)
-rm -rf debian/tmp*
test -f stamp-build || make -f debian/rules build
#
# debian/tmp
install -d ${DEBDIR}
install -p -m 755 debian/postinst debian/postrm ${DEBDIR}
# binaries
install -d ${BINDIR}
install -p -s -m 755 x11/xconq ${BINDIR}
install -p -s -m 755 x11/imf2x ${BINDIR}
install -p -s -m 755 x11/x2imf ${BINDIR}
install -p -s -m 755 x11/xshowimf ${BINDIR}
# scoredir
install -d ${LIBDIR}
install -d ${VARDIR}
install -d -g games -m 2775 ${VARDIR}/scores
ln -s /var/lib/games/xconq/scores ${LIBDIR}/scores
# libraries
install -d ${MENUDIR}
install -p -m 644 debian/menu ${MENUDIR}/xconq
#
install -d ${LIBDIR}/lib-x11
install -p -m 644 lib-x11/* ${LIBDIR}/lib-x11
#
install -d ${LIBDIR}/lib
install -p -m 644 lib/*.dir ${LIBDIR}/lib
install -p -m 644 lib/*.g ${LIBDIR}/lib
install -p -m 644 lib/*.imf ${LIBDIR}/lib
install -p -m 644 lib/news.txt ${LIBDIR}/lib
install -p -m 644 lib/README ${LIBDIR}/lib
install -p -m 755 lib/makedir.sh ${LIBDIR}/lib
# app-defaults
install -d ${APPDIR}
install -p -m 644 x11/Xconq ${APPDIR}
install -p -m 644 x11/Xconq-color ${APPDIR}
install -p -m 644 x11/XShowimf ${APPDIR}
install -p -m 644 x11/XShowimf-color ${APPDIR}
# man pages
install -d ${MANDIR}/man1
install -p -m 644 x11/xshowimf.1 ${MANDIR}/man1
install -d ${MANDIR}/man6
install -p -m 644 x11/xconq.6 ${MANDIR}/man6
gzip -9fr ${MANDIR}
# documentation
install -d ${DOCDIR}
install -p -m 644 debian/copyright ${DOCDIR}
install -p -m 644 debian/changelog ${DOCDIR}/changelog.Debian
gzip -9f ${DOCDIR}/changelog.Debian
install -p -m 644 ChangeLog ${DOCDIR}/changelog
gzip -9f ${DOCDIR}/changelog
install -p -m 644 NEWS ${DOCDIR}
install -d ${DOCDIR}/html
install -p -m 644 doc/*.html ${DOCDIR}/html
ln -s xconq_toc.html ${DOCDIR}/html/index.html
#
# build the package
dpkg-shlibdeps ${BINDIR}/*
dpkg-gencontrol -isp -pxconq -Pdebian/tmp
dpkg --build debian/tmp ..
binary-indep: checkroot
$(checkdir)
-rm -rf debian/tmp-doc
test -f stamp-build || make -f debian/rules build
#
# debian/tmp-doc
install -d ${DDEBDIR}
install -d ${DDOCDIR}
install -p -m 644 debian/README-doc ${DDOCDIR}/README.Debian
install -p -m 644 debian/changelog ${DDOCDIR}/changelog.Debian
gzip -9f ${DDOCDIR}/changelog.Debian
install -p -m 644 debian/copyright ${DDOCDIR}/copyright
# documentation
install -d ${DXCONQDIR}
install -p -m 644 doc/*.ps ${DXCONQDIR}
gzip -9f ${DXCONQDIR}/*.ps
#
dpkg-gencontrol -isp -pxconq-doc -Pdebian/tmp-doc
dpkg --build debian/tmp-doc ..
define checkdir
test -f x11/xconq.c -a -f debian/rules
endef
binary: binary-arch binary-indep
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: config build clean binary binary-arch binary-indep
|