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
|
#!/usr/bin/make -f
# Sample debian.rules -*-makefile -*- for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself. (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified
# Userid of the IRC user/group
irc=39
package=ircd
CC=cc
# This should never be defined in official Debian release...
# HACK=-DGODMODE -DDEBUG
build: build-ircd build-dancer
build-ircd:
$(checkdir)
rm -rf builddir && mkdir builddir
cp -a ADD* Makefile* doc config configure include ircd \
LICENCE INSTALL .patches builddir
-cp debian/config.ircd builddir/config/.config
-cp debian/config.h.ircd builddir/config/config.h
# cd builddir && sh ../debian/dopatch
# cp -p builddir/.patches debian/patches
cd builddir && ./configure --prefix=/usr
cd builddir && $(MAKE) CC="$(CC) $(HACK)" \
IRCDLIBS="-lresolv -lcrypt" all
test -f builddir/ircd/ircd && touch build-ircd
build-dancer: build-ircd
$(checkdir)
mkdir -p debian/build
cd builddir && \
cp -a ADD* Makefile* doc config configure include ircd \
LICENCE INSTALL .patches ../debian/build
cd debian/build && $(MAKE) distclean > /dev/null
cp debian/config.dancer debian/build/config/.config
cp debian/config.h.dancer debian/build/config/config.h
@echo
cd debian/build/ircd && \
patch < ../../friendlymsg.hack
cd debian/build/ircd && \
patch < ../../killop.hack
cd debian/build/ircd && \
patch < ../../motd.hack
cd debian/build/ircd && \
patch < ../../chinitdir.hack
cd debian/build/ircd && \
patch < ../../services.hack
cd debian/build/ircd && \
patch < ../../glines.hack
@echo
cd debian/build/include && \
patch < ../../bigtopic.hack
cd debian/build/include && \
patch < ../../connexit.hack
cd debian/build/include && \
patch < ../../nickdelay.hack
cd debian/build/include && \
patch < ../../longnick.hack
cd debian/build/include && \
patch < ../../patchlevel.patch
@echo
cd debian && tar -czvf build.tar.gz build
cd debian/build && CC="$(CC) $(HACK) " \
./configure --prefix=/usr
cd debian/build && $(MAKE) \
IRCDLIBS="-lresolv -lcrypt" all
test -f debian/build/ircd/ircd && touch build-dancer
build-stock:
$(checkdir)
cp debian/config.ircd config/.config
cp debian/config.h.ircd config/config.h
chmod 755 config/configure
./configure --prefix=/usr
$(MAKE) CC="$(CC) $(HACK)" \
IRCDLIBS="-lresolv -lcrypt" all
cd ircd && $(MAKE) chkconf
test -f ircd/ircd && touch build-stock
clean:
$(checkdir)
rm -rf build-* stamp-configure ircd/crypt/mkpasswd builddir
rm -rf $$(find . -name "*~") $$(find debian/* -type d) debian/patches
-$(MAKE) distclean
rm -rf *~ debian/*.gz debian/*~ debian/files* debian/substvars
find .. -name $(package)*.asc -size 0 -maxdepth 1 -exec rm {} ";"
binary-indep: checkroot build
$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
binary-arch: checkroot build
rm -rf debian/tmp && install -d debian/tmp
cd debian/tmp && install -d $$(cat ../dirs)
dh_installdeb -pircd
dh_installdocs debian/{copyright,release.2.10.01,features.2.10,TODO} \
debian/README_SERVER_NUMERIC debian/{config.*,patches.*} \
builddir/{ADD-TO-IRCRC,INSTALL} doc/*
rm debian/tmp/usr/doc/$(package)/{Makefile*,irc.1,ircd.8}
cp -p debian/ircd.{conf,motd} \
debian/tmp/usr/doc/$(package)/examples
cp -p debian/ircd.{conf,motd} \
debian/tmp/etc/ircd
dh_compress
install builddir/ircd/ircd debian/tmp/usr/sbin/ircd
install debian/build/ircd/ircd debian/tmp/usr/lib/ircd/bin/dancer
install builddir/ircd/chkconf debian/dancerconfig \
debian/tmp/usr/lib/ircd/bin/
dh_strip
dh_shlibdeps
dpkg-gencontrol -pircd
chown -R root.root debian/tmp
chmod -R go=rX debian/tmp
chmod 700 debian/tmp/etc/$(package)
chown -R irc.irc debian/tmp/{var/log/$(package),etc/$(package)}
dpkg --build debian/tmp ..
if egrep "^HACK=" debian/rules; then false; fi
define checkdir
test -f ircd/ircd.c -a -f debian/rules
endef
# Below here is fairly generic really
binary: binary-indep binary-arch
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot
|