X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=debian%2Frules;h=e392b286f1de0c93ffd4b3a88649158ce4a499fd;hb=aa3fa58795ac6dd8134f9c7c8f2fe71bc87cb479;hp=080c603b5f46a64cfd462048f905adacb2538b4d;hpb=0711e68a292c3345d6b74b19248dfd1357091f54;p=mirror_smartmontools-debian.git diff --git a/debian/rules b/debian/rules index 080c603..e392b28 100755 --- a/debian/rules +++ b/debian/rules @@ -5,18 +5,19 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -# for quilt -include /usr/share/quilt/quilt.make +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk -DEB_BUILD_ARCH_OS ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) -DEB_BUILD_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) ifeq ($(DEB_HOST_ARCH_OS),linux) CONFIGURE_ARGS += --with-selinux endif -ifeq ($(DEB_BUILD_ARCH_CPU),armel) - CONFIGURE_ARGS += --without-libcap-ng +ifeq ($(DEB_HOST_ARCH_OS),kfreebsd) + CFLAGS += -I/usr/include/freebsd endif CFLAGS += -fsigned-char -Wall @@ -35,43 +36,51 @@ PACKAGE = smartmontools SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p'| cut -d':' -f2) SVN_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/svn//' ) TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz +SVN_ROOT := 'https://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools' get-orig-source: rm -rf get-orig-source $(TARBALL) mkdir get-orig-source - svn export -r $(SVN_REVISION) https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk/smartmontools/ \ + svn export -r $(SVN_REVISION) $(SVN_ROOT) \ get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig + rm -rf get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig/os_solaris_ata.s GZIP=--best tar czf $(TARBALL) -C get-orig-source $(PACKAGE)-$(SRC_VERSION).orig rm -rf get-orig-source echo " "$(TARBALL)" created; move it to the right destination to build the package" configure: configure-stamp -configure-stamp: debian/stamp-patched +configure-stamp: dh_testdir ./autogen.sh - CFLAGS="${CFLAGS}" ./configure --prefix=/usr \ + CFLAGS="${CFLAGS}" CXXFLAGS="${CFLAGS}" ./configure --prefix=/usr \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --host=$(DEB_HOST_GNU_TYPE) \ --sysconfdir=/etc \ --mandir=/usr/share/man \ - --with-initscriptdir=/etc/init.d \ + --with-initscriptdir=no \ --with-docdir=/usr/share/doc/smartmontools \ - --enable-drivedb \ --enable-savestates \ --enable-attributelog \ --with-savestates=/var/lib/smartmontools/smartd. \ --with-attributelog=/var/lib/smartmontools/attrlog. \ --with-exampledir=/usr/share/doc/smartmontools/examples/ \ + --with-systemdsystemunitdir=/lib/systemd/system \ + --with-smartdscriptdir=/usr/share/smartmontools \ + --with-smartdplugindir=/etc/smartmontools/smartd_warning.d \ + --with-systemdenvfile=/etc/default/smartmontools \ ${CONFIGURE_ARGS} touch configure-stamp - -build: build-stamp +build: build-arch build-indep +build-arch: build-stamp +build-indep: build-stamp build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. $(MAKE) touch build-stamp -clean: unpatch +clean: dh_testdir dh_testroot # rm -f debian/logcheck.logcheck.ignore.* @@ -87,8 +96,7 @@ install: build dh_prep dh_installdirs $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools install - install -D -m 755 debian/smartmontools-bug \ - $(CURDIR)/debian/smartmontools/usr/share/bug/smartmontools + rm -f debian/smartmontools/usr/sbin/update-smart-drivedb # Build architecture-independent files here. binary-indep: @@ -103,13 +111,14 @@ binary-arch: build install dh_installmenu dh_installlogrotate dh_install + dh_link + dh_systemd_enable dh_installinit -- start 20 2 3 4 5 . stop 20 1 . + dh_systemd_enable dh_installcron - dh_installman dh_installinfo dh_lintian - dh_installchangelogs CHANGELOG - dh_link + dh_installchangelogs ChangeLog dh_strip dh_compress dh_fixperms