2010-02-24 23:58:53 +02:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
2011-04-25 00:37:41 +03:00
|
|
|
include /usr/share/cdbs/1/rules/debhelper.mk
|
|
|
|
include /usr/share/cdbs/1/class/autotools.mk
|
2010-02-24 23:58:53 +02:00
|
|
|
|
|
|
|
DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
|
|
|
|
|
|
|
|
|
2011-05-09 16:32:04 +03:00
|
|
|
DEB_CONFIGURE_PREFIX :=
|
|
|
|
DEB_CONFIGURE_SYSCONFDIR := /etc/nut
|
|
|
|
DEB_CONFIGURE_INCLUDEDIR := /usr/include
|
|
|
|
DEB_CONFIGURE_MANDIR := /usr/share/man
|
|
|
|
DEB_CONFIGURE_EXTRA_FLAGS := --without-ssl \
|
2011-04-25 00:37:41 +03:00
|
|
|
--with-cgi \
|
|
|
|
--with-dev \
|
|
|
|
--enable-static \
|
|
|
|
--with-statepath=/var/run/nut \
|
|
|
|
--with-altpidpath=/var/run/nut \
|
|
|
|
--with-drvpath=/lib/nut \
|
|
|
|
--with-cgipath=/usr/lib/cgi-bin/nut \
|
|
|
|
--with-htmlpath=/usr/share/nut/www \
|
|
|
|
--with-pidpath=/var/run/nut \
|
|
|
|
--datadir=/usr/share/nut \
|
|
|
|
--with-pkgconfig-dir=/usr/lib/pkgconfig \
|
|
|
|
--with-user=nut --with-group=nut
|
2010-02-24 23:58:53 +02:00
|
|
|
|
2011-04-25 00:37:41 +03:00
|
|
|
ifeq (linux,$(DEB_HOST_ARCH_OS))
|
|
|
|
DEB_CONFIGURE_EXTRA_FLAGS+=--with-udev-dir=/lib/udev
|
|
|
|
endif
|
2010-02-24 23:58:53 +02:00
|
|
|
|
2011-04-25 00:37:41 +03:00
|
|
|
common-install-arch::
|
2010-02-24 23:58:53 +02:00
|
|
|
# install the bash completion script
|
|
|
|
mkdir -p $(CURDIR)/debian/tmp/etc/bash_completion.d
|
|
|
|
cp $(CURDIR)/scripts/misc/nut.bash_completion \
|
|
|
|
$(CURDIR)/debian/tmp/etc/bash_completion.d/nut
|
|
|
|
|
|
|
|
# install the default configuration
|
|
|
|
for f in $(CURDIR)/debian/tmp/etc/nut/*; do \
|
|
|
|
nf=`basename $${f} | sed 's/\(.*\).sample/\1/'`; \
|
|
|
|
mv $${f} $(CURDIR)/debian/tmp/etc/nut/$${nf}; \
|
|
|
|
done
|
|
|
|
|
2011-04-25 00:37:41 +03:00
|
|
|
DEB_DH_INSTALLINIT_ARGS_nut := -- start 50 2 3 4 5 . stop 50 0 1 6 .
|
2010-02-24 23:58:53 +02:00
|
|
|
|
|
|
|
ifeq (linux,$(DEB_HOST_ARCH_OS))
|
2011-04-25 00:37:41 +03:00
|
|
|
# for Debian
|
|
|
|
DEB_DH_GENCONTROL_ARGS := -- -Vudev="udev (>= 0.124-1)"
|
2010-02-24 23:58:53 +02:00
|
|
|
# for Ubuntu
|
2011-04-25 00:37:41 +03:00
|
|
|
# DEB_DH_GENCONTROL_ARGS := -- -Vudev="udev (>= 136-1)"
|
2010-02-24 23:58:53 +02:00
|
|
|
endif
|