chiark / gitweb /
miscellaneous distribution changes
[disorder] / debian / rules.m4
CommitLineData
460b9539 1#
2# This file is part of DisOrder.
eb525fcd 3# Copyright (C) 2004, 2005, 2006, 2007 Richard Kettlewell
460b9539 4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful, but
11# WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18# USA
19#
20
21CONFIGURE=--prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --mandir=/usr/share/man
22LIBTOOL=./libtool
71b49a3c 23FAKEROOT=fakeroot
460b9539 24
25build
26
27archpkg([disorder], [ m4_dnl
93ca72f2
RK
28 $(MAKE) DESTDIR=`pwd`/debian/disorder installdirs install -C doc
29 $(MAKE) DESTDIR=`pwd`/debian/disorder installdirs install -C clients
30 $(MAKE) DESTDIR=`pwd`/debian/disorder installdirs install -C lib
31 $(MAKE) DESTDIR=`pwd`/debian/disorder installdirs install -C scripts
32 rm -rf debian/disorder/usr/share/man/man8
33 rm -rf debian/disorder/usr/share/disorder/*.html
66ec39ed 34 rm -f debian/disorder/usr/bin/disorder-playrtp
6f3acea9 35 rm -f debian/disorder/usr/bin/disobedience
66ec39ed 36 rm -f debian/disorder/usr/share/man/man1/disorder-playrtp.1
6f3acea9 37 rm -f debian/disorder/usr/share/man/man1/disobedience.1
294c70ed 38 $(MKDIR) debian/disorder/etc/disorder
460b9539 39 dpkg-shlibdeps -Tdebian/substvars.disorder \
93ca72f2 40 debian/disorder/usr/bin/*
07184dd3 41 $(INSTALL_DATA) CHANGES README debian/README.Debian \
460b9539 42 BUGS README.* \
43 debian/disorder/usr/share/doc/disorder/.
07184dd3
RK
44 bzr log > debian/disorder/usr/share/doc/disorder/changelog
45 gzip -9f debian/disorder/usr/share/doc/disorder/changelog \
460b9539 46 debian/disorder/usr/share/doc/disorder/CHANGES \
47 debian/disorder/usr/share/doc/disorder/README \
48 debian/disorder/usr/share/doc/disorder/README.* \
49 debian/disorder/usr/share/doc/disorder/BUGS \
f1b2e9ac 50 debian/disorder/usr/share/man/man*/*
460b9539 51])
52
93ca72f2
RK
53archpkg([disorder-server], [ m4_dnl
54 $(MAKE) DESTDIR=`pwd`/debian/disorder-server staticdir=/var/www/disorder installdirs install -C images
55 $(MAKE) DESTDIR=`pwd`/debian/disorder-server staticdir=/var/www/disorder installdirs install -C server
56 $(MAKE) DESTDIR=`pwd`/debian/disorder-server staticdir=/var/www/disorder installdirs install -C templates
57 $(MAKE) DESTDIR=`pwd`/debian/disorder-server staticdir=/var/www/disorder installdirs install -C driver
58 $(MAKE) DESTDIR=`pwd`/debian/disorder-server staticdir=/var/www/disorder installdirs install -C plugins
59 $(MAKE) DESTDIR=`pwd`/debian/disorder-server staticdir=/var/www/disorder installdirs install -C sounds
60 $(MAKE) DESTDIR=`pwd`/debian/disorder-server staticdir=/var/www/disorder installdirs install -C doc
61 rm -rf debian/disorder-server/usr/share/man/man1
62 rm -rf debian/disorder-server/usr/share/man/man3
63 rm -rf debian/disorder-server/usr/share/man/man5
64 $(MKDIR) debian/disorder-server/etc/disorder
65 $(MKDIR) debian/disorder-server/etc/init.d
66 $(MKDIR) debian/disorder-server/usr/lib/cgi-bin/disorder
67 $(MKDIR) debian/disorder-server/var/lib/disorder
68 $(INSTALL_SCRIPT) examples/disorder.init \
69 debian/disorder-server/etc/init.d/disorder
70 $(INSTALL_DATA) debian/etc.disorder.config \
71 debian/disorder-server/etc/disorder/config
72 $(INSTALL_DATA) debian/etc.disorder.options \
73 debian/disorder-server/etc/disorder/options
74 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) server/disorder.cgi \
75 $(shell pwd)/debian/disorder-server/usr/lib/cgi-bin/disorder/disorder
76 dpkg-shlibdeps -Tdebian/substvars.disorder-server \
77 debian/disorder-server/usr/lib/cgi-bin/disorder/* \
78 debian/disorder-server/usr/sbin/* \
79 debian/disorder-server/usr/lib/disorder/*.so*
80 $(INSTALL_DATA) debian/htaccess \
81 debian/disorder-server/usr/lib/cgi-bin/disorder/.htaccess
82 rm -rf debian/disorder-server/usr/share/doc/disorder-server
83 ln -s disorder debian/disorder-server/usr/share/doc/disorder-server
84])
85
66ec39ed 86archpkg([disorder-playrtp], [ m4_dnl
294c70ed
RK
87 $(MKDIR) debian/disorder-playrtp/usr/bin
88 $(MKDIR) debian/disorder-playrtp/usr/share/man/man1
07184dd3 89 $(INSTALL_PROGRAM) clients/disorder-playrtp \
66ec39ed 90 debian/disorder-playrtp/usr/bin/disorder-playrtp
07184dd3 91 $(INSTALL_DATA) doc/disorder-playrtp.1 \
66ec39ed
RK
92 debian/disorder-playrtp/usr/share/man/man1/disorder-playrtp.1
93 dpkg-shlibdeps -Tdebian/substvars.disorder-playrtp \
94 debian/disorder-playrtp/usr/bin/*
07184dd3 95 $(INSTALL_DATA) debian/README.RTP \
66ec39ed 96 debian/disorder-playrtp/usr/share/doc/disorder-playrtp/README
07184dd3
RK
97 $(INSTALL_DATA) CHANGES debian/disorder-playrtp/usr/share/doc/disorder-playrtp/CHANGES
98 gzip -9f debian/disorder-playrtp/usr/share/doc/disorder-playrtp/CHANGES \
66ec39ed
RK
99 debian/disorder-playrtp/usr/share/man/man*/*
100])
101
6f3acea9 102archpkg([disobedience], [ m4_dnl
294c70ed
RK
103 $(MKDIR) debian/disobedience/usr/bin
104 $(MKDIR) debian/disobedience/usr/share/man/man1
105 $(MKDIR) debian/disobedience/usr/share/pixmaps
106 $(MKDIR) debian/disobedience/usr/share/menu
07184dd3
RK
107 $(MAKE) -C disobedience install DESTDIR=`pwd`/debian/disobedience
108 $(INSTALL_DATA) doc/disobedience.1 \
6f3acea9 109 debian/disobedience/usr/share/man/man1/disobedience.1
294c70ed
RK
110 $(INSTALL_DATA) images/disobedience16x16.xpm \
111 images/disobedience32x32.xpm \
112 debian/disobedience/usr/share/pixmaps
113 $(INSTALL_DATA) debian/usr.share.menu.disobedience \
114 debian/disobedience/usr/share/menu/disobedience
6f3acea9
RK
115 dpkg-shlibdeps -Tdebian/substvars.disobedience \
116 debian/disobedience/usr/bin/*
93ca72f2
RK
117 rm -rf debian/disobedience/usr/share/doc/disobedience
118 ln -s disorder debian/disobedience/usr/share/doc/disobedience
6f3acea9
RK
119])
120
71b49a3c
RK
121DEBVERSION:=$(shell dpkg-parsechangelog|awk '/Version:/ {print $$2}')
122DSC:=disorder_$(DEBVERSION).dsc
123DEBSRC:=disorder_$(DEBVERSION).tar.gz
124VERSION:=$(shell $(MAKE) echo-version)
125
126source:
127 $(MAKE) dist
128 rm -rf disorder-$(VERSION)
129 tar xfz disorder-$(VERSION).tar.gz
130 dpkg-source -b disorder-$(VERSION)
131 rm -rf disorder-$(VERSION) disorder-$(VERSION).tar.gz
132
133source-check: source
134 rm -rf disorder-$(DEBVERSION)
135 dpkg-source -x $(DSC)
136 cd disorder-$(DEBVERSION) && dpkg-buildpackage -r$(FAKEROOT)
137
138.PHONY: source source-check
139
460b9539 140binary
141
142clean
143
144regenerate