chiark / gitweb /
debian: Switch to CDBS.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 21 Dec 2008 19:35:33 +0000 (19:35 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 21 Dec 2008 19:35:33 +0000 (19:35 +0000)
This involves hacking the Makefile a little to separate CFLAGS and
LDFLAGS into things the Debian build system can mess with and things
which will screw the build.

It also involves messing with the debian/*.install files in obvious
ways.  And the build leaves a bunch of cruft which needs ignoring.

.gitignore
Makefile
debian/.gitignore
debian/noip.install
debian/rules
debian/uopen.install

index 7ae0ae4475a1a2506e096ad510cfbc0069d0a09e..0191032f8ad1ce999873bd31a662ea4bc12c5584 100644 (file)
@@ -6,3 +6,4 @@ build
 noip
 uopen
 COPYING
+*.o
index f69375a66ad6f0c145bb7cd3169cd1979addc16d..c7afb3a5914e52b295abac1e81826fc98606a734 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,8 +10,10 @@ man1dir = ${mandir}/man1
 
 CC = gcc
 LD = gcc
-CFLAGS = -O2 -g -fPIC -Wall
-LDFLAGS = -shared
+CFLAGS = -O2 -g -Wall
+LDFLAGS =
+REAL_CFLAGS = $(CFLAGS) -fPIC
+REAL_LDFLAGS = $(LDFLAGS) -shared
 LDLIBS = -ldl
 INST_BIN = install -c -m755
 INST_LIB = install -c -m644
@@ -27,11 +29,11 @@ TARGETS = $(LIBS) $(SCRIPTS)
 SOURCES = noip.c uopen.c withlib.in
 all: $(TARGETS)
 %.o: %.c
-       $(CC) -c $(CFLAGS) $< -o $@
+       $(CC) -c $(REAL_CFLAGS) $< -o $@
 noip.so: $(patsubst %.c, %.o, noip.c)
-       $(LD) $(LDFLAGS) $< $(LDLIBS) -o $@
+       $(LD) $(REAL_LDFLAGS) $< $(LDLIBS) -o $@
 uopen.so: $(patsubst %.c, %.o, uopen.c)
-       $(LD) $(LDFLAGS) $< $(LDLIBS) -o $@
+       $(LD) $(REAL_LDFLAGS) $< $(LDLIBS) -o $@
 $(SCRIPTS): withlib.in
        for i in $(SCRIPTS); do \
          sed "s/@lib@/$$i/" withlib.in >$$i.new || exit 1; \
index 4193c2fbd225b8f3fa34ea262dd7c478b5d6ebc8..48e3561c72fc20f52d0661f74d44963d4ca439c6 100644 (file)
@@ -5,4 +5,6 @@ substvars
 *.debhelper
 noip
 uopen
-
+*.log
+compat
+stamp-*
index 018d14ae9d2fa6a48f3f8630c18ca4d55677a199..53b5ef3ddbccc668f8b1705ada17b9f05b45e8e0 100644 (file)
@@ -1,3 +1,3 @@
-usr/bin/noip
-usr/lib/noip.so
-usr/share/man/man1/noip.1
+debian/tmp/usr/bin/noip
+debian/tmp/usr/lib/noip.so
+debian/tmp/usr/share/man/man1/noip.1
index 6739f8fce85c21fadc904a29e4cc7fddd307a8d4..3d2464872fb328aefe6f2b6f884513e7837a196c 100755 (executable)
@@ -1,48 +1,11 @@
 #! /usr/bin/make -f
 
-export DH_COMPAT = 4
+CDBS = /usr/share/cdbs/1
 
-build:
-       make clean
-       make
-       touch build
+include $(CDBS)/rules/debhelper.mk
+include $(CDBS)/class/makefile.mk
 
-clean:
-       dh_clean
-       make clean
-
-install: build
-       dh_clean
-       make install \
-         prefix=/usr \
-         mandir=/usr/share/man \
-         DESTDIR=`pwd`/debian/tmp
-       dh_install --sourcedir=debian/tmp
-       rm -rf debian/tmp
-
-binary-indep:
-
-binary-arch: install
-       dh_testdir -a
-       dh_testroot -a
-       dh_compress -a
-       dh_installdocs -a
-       dh_strip -a
-       dh_shlibdeps -a
-       dh_gencontrol -a
-       dh_fixperms -a
-       dh_installdeb -a
-       dh_md5sums -a
-       dh_builddeb -a
-
-binary: binary-indep binary-arch
-
-source:
-       rm -rf deb-dist.tar.gz =deb=
-       make dist DISTTAR=deb-dist.tar.gz
-       mkdir =deb=
-       cd =deb=; tar xvfz ../deb-dist.tar.gz
-       d=`pwd`; cd ..; dpkg-source -i -i'/\.svn/' -b $$d/=deb=/*
-       rm -rf deb-dist.tar.gz =deb=
-
-.PHONY: binary binary-arch binary-indep clean install source 
+DEB_MAKE_CLEAN_TARGET = clean
+DEB_MAKE_INSTALL_TARGET = install \
+       prefix=/usr mandir=/usr/share/man \
+       DESTDIR=debian/tmp
index cb36fa79e588a8518b19e16843a1ec483e982c79..957cd42e653b8f5acaee7f69fb960787b813e5f2 100644 (file)
@@ -1,3 +1,3 @@
-usr/bin/uopen
-usr/lib/uopen.so
-usr/share/man/man1/uopen.1
+debian/tmp/usr/bin/uopen
+debian/tmp/usr/lib/uopen.so
+debian/tmp/usr/share/man/man1/uopen.1