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
|
#!/usr/bin/make -f
#
# debian/rules file for xpcd.
#
# $Id: rules,v 1.7 2004/05/26 11:28:18 absurd Exp $
#
# (c) 1997-2001 Stephan A Suerken <absurd@debian.org>, GPL.
#
#----------------------------------------------------------------------
# CONFIGURATION
#
export DH_VERBOSE=0
# Compiler Flags
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
# This must be in sync with control
#svga_archs=i386 alpha arm
svga_archs=i386
#----------------------------------------------------------------------
# GENERIC PART
#
# build should always be the default target
default: build
build: build-stamp
binary: binary-clean binary-indep binary-arch
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
.PHONY: binary binary-arch binary-indep clean binary-clean
#----------------------------------------------------------------------
# PACKAGE PART
#
build-stamp:
dh_testdir
# Note 0:
# Makefile is NOT a standard GNU automake makefile; most options for configure
# dont have any effect as the housemade Makefile.in does not recognize them :(
# Note 1:
# Note: Don't recreate ./configure -- or if needed, use "make autoconf" rather
# than autoconf itself (strange gimp recognition problem).
# Note 2:
# the x11_libdir arg to make will make compile the binaries with the correct SYSRC
# location while not interfering with compile time searc paths. As suggested by the
# upstream author. Upstream Makefile.in: -DSYSRC="\"$(x11_libdir)/xpcd/system.xpcdrc\""
ifeq (,$(findstring $(DEB_HOST_ARCH),$(svga_archs)))
CFLAGS="$(CFLAGS)" ./configure --with-x --prefix=usr
else
CFLAGS="$(CFLAGS)" ./configure --with-x --prefix=usr --with-svga
endif
make x11_libdir=/etc
touch $@
binary-indep: build
# dh_testdir
# dh_testroot
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
binary-arch: build
dh_testdir
dh_testroot
# Package xpcd
dh_installdirs -pxpcd usr/bin usr/X11R6/include/X11/pixmaps etc/xpcd \
etc/X11/app-defaults etc/X11/de/app-defaults etc/X11/da/app-defaults
install test/pcdtoppm debian/tmp/usr/bin/
install xpcd/xpcd debian/tmp/usr/bin/
install -m644 xpcd/xpcd-color.xpm debian/tmp/usr/X11R6/include/X11/pixmaps/
install -m644 xpcd/xpcd-gray.xpm debian/tmp/usr/X11R6/include/X11/pixmaps/
install -m644 debian/xpcd-menu.xpm debian/tmp/usr/X11R6/include/X11/pixmaps/
install -m644 xpcd/system.xpcdrc debian/tmp/etc/xpcd/
install -m644 xpcd/Xpcd-2.ad debian/tmp/etc/X11/app-defaults/Xpcd-2
install -m644 xpcd/Xpcd-2.de.ad debian/tmp/etc/X11/de/app-defaults/Xpcd-2
install -m644 xpcd/Xpcd-2.da.ad debian/tmp/etc/X11/da/app-defaults/Xpcd-2
dh_installman -pxpcd debian/man/xpcd.1 debian/man/pcdtoppm.1
# gimp 1.2 no longer in debian, skipping gimp support
# Package xpcd-gimp
# dh_installdirs -pxpcd-gimp usr/lib/gimp/1.2/plug-ins
# install xpcd/xpcd-gate debian/xpcd-gimp/usr/lib/gimp/1.2/plug-ins/
# Package xpcd-svga
ifneq (,$(findstring $(DEB_HOST_ARCH),$(svga_archs)))
dh_installdirs -pxpcd-svga usr/bin
install -m4755 test/pcdview debian/xpcd-svga/usr/bin/pcdsvgaview
install debian/pcdsvgaview_photocd debian/xpcd-svga/usr/bin/
dh_installman -pxpcd-svga debian/man/pcdsvgaview.1 debian/man/pcdsvgaview_photocd.1
endif
# debhelper processing
# Package xpcd
dh_installdocs README xpcd.lsm
dh_installexamples
# All packages
dh_installmenu --same-arch
dh_installchangelogs --same-arch
dh_strip --same-arch
dh_compress --same-arch
dh_fixperms --same-arch
ifneq (,$(findstring $(DEB_HOST_ARCH),$(svga_archs)))
chmod 4755 debian/xpcd-svga/usr/bin/pcdsvgaview
endif
dh_installdeb --same-arch
dh_shlibdeps --same-arch
dh_gencontrol --same-arch
dh_md5sums --same-arch
dh_builddeb --same-arch
binary-clean:
dh_testdir
dh_clean
-rm -rf debian/tmp debian/xpcd-svga debian/files*
clean: binary-clean
dh_testdir
# xpcd calls distclean realclean ...
-make realclean
-rm -f build-stamp `find . -name "*~"`
|