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
|
#!/usr/bin/make -f
#
# debian/rules file for gom.
#
# $Id: rules,v 1.4 2001/06/17 17:57:33 absurd Exp $
#
# Copyright 1997-2001 Stephan A Suerken <absurd@debian.org>.
#
SHELL=/bin/bash
#
# CONFIGURATION
#
export DH_VERBOSE=0
CFLAGS = -O2 -Wall
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
#
# 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
#
# Note 0.29.99: The upstream source is planning to skip the xview interactive
# interface and with it, the compile-option to create different binary
# flavors for gom -- but use one standard gom binary with the
# mandatory command line interface and the ncurses interactive
# interface. With 0.29.99, the default is to compile that standard
# version; support for the xview interface is still there.
# Conclusion: For now, I stay with the old naming convention and
# alternatives, leaving out the (now unavailable) command line only
# "gom-c" binary.
# Binaries are named gom-{c|t|x}
# c: with command line interface (mandatory)
# t: with build-in interactive terminal interface (ncurses)
# x: with build-in interactive X interface (xview)
binaries=gom-ct gom-ctx
# these are the options (needed for the implicit rule)
configure_options_ct=
configure_options_ctx=--enable-x-gomii
gom-%:
dh_testdir
./configure ${configure_options_$*} && make clean && make
cp src/gom $@
build-stamp: ${binaries}
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 gom
dh_installdirs usr/bin usr/sbin etc/default etc/modutils
install gom-ct debian/tmp/usr/bin
install src/gomconfig debian/tmp/usr/sbin
# etc/default/gom, etc/modutils/gom
install -m644 debian/default debian/tmp/etc/default/gom
install -m644 debian/modutils debian/tmp/etc/modutils/gom
dh_installinit --no-restart-on-upgrade --update-rcd-params="start 99 S ."
dh_installdocs AUTHORS NEWS README
# Caution: This will install CVS dirs, too (dh_installexamples should have an exclude option). See Hacking below.
dh_installexamples examples/*
# To comply to 11.7.3 (templates) of policy. This is hacky, maybe debhelper will eventually handle it?
install -d debian/tmp/usr/share/gom/
mv debian/tmp/usr/share/doc/gom/examples/default debian/tmp/usr/share/gom/default
cd debian/tmp/usr/share/doc/gom/examples && ln -s ../../../gom/default .
# Hacking CVS dir away from share/gom at least -- postinst needs it to be dir-free.
rm -rf debian/tmp/usr/share/gom/default/CVS
# Package gom-x
dh_installdirs -pgom-x usr/bin
install gom-ctx debian/gom-x/usr/bin
# Go debhelper, go
dh_installmenu
dh_installchangelogs ChangeLog
# Install all man pages to 1st package. Else compress wont work on gom-ctx.1
dh_installman src/gom.1 src/gomconfig.8 debian/man/gom-ct.1 debian/man/gom-ctx.1
dh_compress
dh_movefiles -pgom-x usr/share/man/man1/gom-ctx.1.gz
dh_strip
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary-clean:
dh_testdir
dh_clean
clean: binary-clean
dh_testdir
rm -f build-stamp
# upstream cleanup
-make distclean
-rm -f build ${binaries} core `find . -type f -name "*~"`
|