Commit 36eb479d authored by Andrew Price's avatar Andrew Price

Update .deb building bits

- Remove the -s from `install' runs in the src/ Makefiles to stop stripping our binaries
- Add a new -dbg deb package
- Update to debhelper compat level 7 and make use of the new magic in the rules file
- Add mw3.install to tell it what files to install in the mw3 package
- Rename dirs to mw3.dirs
- Stop lintian complaining about the init script
- Etc.
parent b613acfc
......@@ -46,7 +46,7 @@ install tarball rpm: export
deb: export
$(MAKE) -C $(TMPDIR)/$(MWVERSION) $@
mv $(TMPDIR)/mw3_$(VERSION)*.deb $(CURDIR)/
mv $(TMPDIR)/mw3{,-dbg}_$(VERSION)*.deb $(CURDIR)/
rm -rf $(TMPDIR)/$(MWVERSION)
else
# A temp dir doesn't exist so create it and invoke this makefile again
......
......@@ -3,7 +3,6 @@ SVNVER = $(shell ( svnversion -c . 2>/dev/null || echo 0:0 ) | cut -d : -f 2)
VERSION_MAJOR = 2
VERSION_MINOR = 17
ifeq ($(VERSION_TWEAK),)
ifeq ($(SVNVER),exported)
# mw.rev is created after an export so we can rely on it to provide the svn rev here
VERSION_TWEAK = $(shell cat $(SRCROOT)/mw.rev)
......@@ -13,13 +12,12 @@ $(warning failed to run svnversion, is it installed? VERSION_TWEAK will be set t
endif
VERSION_TWEAK = $(SVNVER)
endif
endif
VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_TWEAK)
MWVERSION = mw3-$(VERSION)
prefix ?= /usr/local
prefix ?= /usr
libdir ?= $(prefix)/lib
bindir ?= $(prefix)/bin
datadir ?= $(prefix)/share
......
......@@ -2,7 +2,7 @@ Source: mw3
Section: misc
Priority: extra
Maintainer: Milliways Developers <mw-devel@lists.sucs.org>
Build-Depends: cdbs, debhelper (>= 5), libreadline-dev (>=5), libcurl4-dev | libcurl-dev, libmozjs-dev, libsqlite3-dev
Build-Depends: debhelper (>= 8), libreadline-dev (>=5), libcurl4-dev | libcurl-dev, libmozjs-dev, libsqlite3-dev, libjansson-dev
Standards-Version: 3.7.2
Package: mw3
......@@ -16,9 +16,7 @@ Package: mw3-dbg
Architecture: any
Section: debug
Priority: extra
Depends: debhelper (>= 5),
mw3 (= ${binary:Version}),
${misc:Depends}
Depends: debhelper (>= 5), mw3 (= ${binary:Version}), ${misc:Depends}
Description: debugging symbols for mw3
Milliways III talker
.
......
usr/bin/mw
usr/lib/mw/*
usr/share/locale/*
etc/init.d/mwserv
......@@ -20,6 +20,8 @@ if ! getent passwd mw >/dev/null 2>&1; then
--ingroup mw mw
fi
update-rc.d mwserv defaults
chown -R mw:mw /usr/lib/mw
chown mw:mw /usr/bin/mw
chown mw:mw /usr/lib/mw/mwpoll
......
#!/bin/sh -e
if [ "$1" = purge ]; then
update-rc.d mwserv remove
fi
#!/usr/bin/make -f
#export DH_VERBOSE=1
configure: configure-stamp
configure-stamp:
dh_testdir
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
dh_auto_build -- prefix=/usr
touch $@
%:
dh $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
$(MAKE) clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
dh_auto_install -- prefix=/usr
rm -f $(CURDIR)/debian/mw3/usr/lib/mw/COPYING
rm -f $(CURDIR)/debian/mw3/usr/lib/mw/LICENSE
rm -f $(CURDIR)/debian/mw3/usr/lib/mw/README
rm -f $(CURDIR)/debian/mw3/usr/lib/mw/INSTALL
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_link
dh_strip --dbg-package=mw3-dbg
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
.PHONY: override_dh_strip
override_dh_strip:
dh_strip --dbg-package=mw3-dbg
#! /bin/sh
### BEGIN INIT INFO
# Provides: mw
# Required-Start:
# Required-Stop:
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Milliways comms server
......
......@@ -70,7 +70,7 @@ del_user: del_user.o perms.o strings.o
$(CC) $(LDFLAGS) -o $@ $^
install: mw
install -Ds mw $(DESTDIR)$(bindir)/mw
install -D mw $(DESTDIR)$(bindir)/mw
install -d $(DESTDIR)$(LOGDIR)
install -d $(DESTDIR)$(MSGDIR)
install -d $(DESTDIR)$(STATEDIR)
......
......@@ -53,7 +53,7 @@ clean:
-rm -f *.o *.d mwserv
install: mwserv
install -Ds mwserv $(DESTDIR)$(HOMEPATH)/mwserv
install -D mwserv $(DESTDIR)$(HOMEPATH)/mwserv
ifndef TESTDIR
test:
......
......@@ -53,7 +53,7 @@ clean:
-rm -f *.o *.d mwpoll
install: mwpoll
install -Ds mwpoll $(DESTDIR)$(HOMEPATH)/mwpoll
install -D mwpoll $(DESTDIR)$(HOMEPATH)/mwpoll
ifndef TESTDIR
test:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment