Switch to cdbs

* debian/rules:
  - Switch to cdbs
  - Remove not existing configure options (Closes: #611813)
  - Drop Phony rules (Closes: #613699)
* debian/control:
  - Add cdbs build-dependency
This commit is contained in:
Laurent Bigonville 2011-04-24 23:37:41 +02:00
parent 06a2c09071
commit 9f5431316b
3 changed files with 39 additions and 105 deletions

8
debian/changelog vendored
View file

@ -5,8 +5,14 @@ nut (2.6.0-2) UNRELEASED; urgency=low
* debian/nut.lintian-overrides: Fix typo
* debian/patch/0002-fix_libupsclient_pc.patch: Fix libupsclient.pc (Closes:
#624255)
* debian/rules:
- Switch to cdbs
- Remove not existing configure options (Closes: #611813)
- Drop Phony rules (Closes: #613699)
* debian/control:
- Add cdbs build-dependency
-- Laurent Bigonville <bigon@debian.org> Sat, 07 May 2011 01:07:39 +0200
-- Laurent Bigonville <bigon@debian.org> Sat, 07 May 2011 01:14:50 +0200
nut (2.6.0-1) unstable; urgency=low

1
debian/control vendored
View file

@ -4,6 +4,7 @@ Priority: optional
Maintainer: Arnaud Quette <aquette@debian.org>
Uploaders: Laurent Bigonville <bigon@debian.org>
Build-Depends: debhelper (>= 8),
cdbs,
autoconf,
automake,
libtool,

97
debian/rules vendored
View file

@ -1,24 +1,12 @@
#!/usr/bin/make -f
#export DH_VERBOSE=1
export DH_OPTIONS=
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
CFLAGS+=$(if $(findstring debug,$(DEB_BUILD_OPTIONS)),-g)
CFLAGS+=$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),-O0,-O2)
CONFIGUREFLAGS+=$(if $(findstring nostrip,$(DEB_BUILD_OPTIONS)),,--enable-strip)
CONFIGUREFLAGS+=--build=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CONFIGUREFLAGS+=--host=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
CONFIGUREFLAGS+=$(if $(wildcard /usr/include/linux/hiddev.h),--with-linux-hiddev=/usr/include/linux/hiddev.h,--without-linux-hiddev)
ifeq (linux,$(DEB_HOST_ARCH_OS))
CONFIGUREFLAGS+=--with-udev-dir=/lib/udev
endif
configure: configure-stamp
configure-stamp:
dh_testdir
CFLAGS='$(CFLAGS)' ./configure $(CONFIGUREFLAGS) \
--prefix=/usr \
DEB_CONFIGURE_EXTRA_FLAGS := --prefix=/usr \
--exec-prefix=/ \
--sysconfdir=/etc/nut \
--mandir=/usr/share/man \
@ -38,45 +26,12 @@ configure-stamp:
--datadir=/usr/share/nut \
--with-pkgconfig-dir=/usr/lib/pkgconfig \
--with-user=nut --with-group=nut
touch $@
build: configure
build: build-stamp
build-stamp:
dh_testdir
$(MAKE)
touch $@
clean:
dh_testdir
dh_testroot
rm -f configure-stamp build-stamp install-stamp
[ ! -f Makefile ] || $(MAKE) distclean
dh_clean
# debconf-updatepo
# -test -r /usr/share/misc/config.sub && \
# cp -f /usr/share/misc/config.sub config.sub
# -test -r /usr/share/misc/config.guess && \
# cp -f /usr/share/misc/config.guess config.guess
uninstall:
dh_testdir
dh_testroot
rm -f install-stamp
dh_prep
install: build
install: install-stamp
install-stamp: DH_OPTIONS=
install-stamp:
dh_testdir
dh_testroot
dh_prep
dh_installdirs
$(MAKE) install \
DESTDIR=$(CURDIR)/debian/tmp RUNUID=65534 RUNGID=65534
ifeq (linux,$(DEB_HOST_ARCH_OS))
DEB_CONFIGURE_EXTRA_FLAGS+=--with-udev-dir=/lib/udev
endif
common-install-arch::
# install the bash completion script
mkdir -p $(CURDIR)/debian/tmp/etc/bash_completion.d
cp $(CURDIR)/scripts/misc/nut.bash_completion \
@ -88,39 +43,11 @@ install-stamp:
mv $${f} $(CURDIR)/debian/tmp/etc/nut/$${nf}; \
done
dh_installchangelogs ChangeLog
dh_installinit -- start 50 2 3 4 5 . stop 50 0 1 6 .
dh_install
dh_installman
dh_installdocs -XMakefile
dh_link
touch $@
DEB_DH_INSTALLINIT_ARGS_nut := -- start 50 2 3 4 5 . stop 50 0 1 6 .
binary-indep: DH_OPTIONS=-i
binary-indep: install
binary-arch: DH_OPTIONS=-a
binary-arch: install
dh_testdir
dh_testroot
# dh_installdebconf
dh_strip
dh_compress
dh_fixperms
dh_makeshlibs
dh_lintian -pnut
dh_installdeb
dh_shlibdeps
# dh_shlibdeps -Xlibupsclient.a
ifeq (linux,$(DEB_HOST_ARCH_OS))
dh_gencontrol -- -Vudev="udev (>= 0.124-1)"
# for Debian
DEB_DH_GENCONTROL_ARGS := -- -Vudev="udev (>= 0.124-1)"
# for Ubuntu
# dh_gencontrol -- -Vudev="udev (>= 136-1)"
else
dh_gencontrol -- -Vudev=""
# DEB_DH_GENCONTROL_ARGS := -- -Vudev="udev (>= 136-1)"
endif
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary configure install uninstall