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 140 141 142 143 144 145 146 147 148 149 150 151 152
|
#!/usr/bin/make -f
#
# debian/rules file for gom.
#
# Copyright 1997 Stephan Alexander Suerken <absurd@debian.org>.
#
#
# CONFIGURATION
#
export DH_VERBOSE=1
#
# 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
#
# 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=gom-c gom-ct
binaries_gom-x=gom-ctx
binaries=${binaries_gom} ${binaries_gom-x}
# these are the options (needed for the implicit rule)
configure_options_c=--disable-t-gomii --disable-x-gomii
configure_options_ct=--disable-x-gomii
configure_options_ctx=
gom-%:
dh_testdir
./configure ${configure_options_$*}
make clean; make
cp 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
#######old pre-installing via upstream makefile#########
# Installing gom via its own standard GNU automake Makefile
# (this will install all neccessary dirs, too)
# make install prefix=debian/tmp/usr
#
# Remove original "gom" now (if doing that before make install in the upstream, make install will remake ;(
# rm -f debian/tmp/usr/bin/gom
#######end old pre-installing via upstream makefile#########
##########old debstd part##########
# run debstd (creating all the non-base binary packages)
# debstd
# Generate the base package
# dpkg-gencontrol -pgom
# dpkg --build debian/tmp ..
###########end old debstd part##########
# Install the binaries
install -d debian/tmp/usr/bin
install ${binaries_gom} debian/tmp/usr/bin
install -d debian/gom-x/usr/X11R6/bin
install ${binaries_gom-x} debian/gom-x/usr/X11R6/bin
# Install gomconfig
install -d debian/tmp/usr/sbin
install debian/gomconfig debian/tmp/usr/sbin
# Install the conffiles
install -d debian/tmp/etc/gom
install -d debian/tmp/etc/rc.boot/
cp debian/etc-rc.boot-gom debian/tmp/etc/rc.boot/gom
# not done by dh_fixperms. Bug?
chmod 755 debian/tmp/etc/rc.boot/gom
# auto: debian/copyright debian/README.Debian debian/TODO
dh_installdocs AUTHORS NEWS README
# auto: %
dh_installexamples debian/etc-gom-gomrc.example debian/etc-gom-default.example
# auto: %; menu menu-method --or-- package.menu package.menu-method
dh_installmenu
# dh_installcron
# auto: all found man pages; exclude args
dh_installmanpages -pgom gom-ctx.1x
dh_installmanpages -pgom-x gom.1 gom-c.1 gom-ct.1
dh_undocumented gomconfig.8
# auto: debian/changelog
dh_installchangelogs ChangeLog
# no need for movefiles
# dh_movefiles
dh_strip
dh_compress
# dh_compress does not compress (here: make symlink) man page in second package
# obviously because it can't find gom.1.gz in same package?? ; seems to be a bug
# Fixing this:
cd debian/gom-x/usr/X11R6/man/man1/ && rm gom-ctx.1x && ln -s ../../../man/man1/gom.1.gz gom-ctx.1x.gz
# dh_compress -pgom-x
dh_fixperms
# dh_suidregister
dh_installdeb
# dependencies for binaries
dh_shlibdeps
dh_gencontrol
# dh_makeshlibs
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 "*~"`
# these two links are made by ./configure, but not cleaned with make distclean
# this is may be considered a bug (of the upstream gom package)...
# (they mess up diff if they are left over)
-rm gom_driver.c gom_driver.h
|