]> git.proxmox.com Git - mirror_smartmontools-debian.git/blobdiff - debian/rules
Updated to standards version 3.8.3 (No changes needed)
[mirror_smartmontools-debian.git] / debian / rules
index 1564287c99057661478cdf3ea2d2ee9dee2fcbea..5075d61298a1625132b027605dcae6b742193aa8 100755 (executable)
@@ -3,13 +3,13 @@
 # GNU copyright 1997 to 1999 by Joey Hess.
 
 # Uncomment this to turn on verbose mode.
-export DH_VERBOSE=1
+#export DH_VERBOSE=1
 
-# for dpatch
-include /usr/share/dpatch/dpatch.make
+# for quilt
+include /usr/share/quilt/quilt.make
 
 
-CFLAGS = -fsigned-char -Wall
+CFLAGS += -fsigned-char -Wall
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
         CFLAGS += -O0
 else
@@ -21,9 +21,24 @@ else
         INSTALL_PROGRAM = install
 endif
 
+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
+
+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/ \
+                       get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig
+               #rm -rf get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig/debian
+               #cd get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig/ ; sh ../../debian/remove-nonfree.sh
+               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: patch-stamp
+configure-stamp: debian/stamp-patched
        dh_testdir
        ./autogen.sh
        CFLAGS="${CFLAGS}" ./configure --prefix=/usr             \
@@ -55,8 +70,6 @@ clean: unpatch
        -$(MAKE) distclean
        rm -f build-stamp configure-stamp \
              Makefile.in examplescripts/Makefile.in aclocal.m4 configure
-               
-
        dh_clean
 
 install: build
@@ -81,13 +94,9 @@ install: build
                $(CURDIR)/debian/smartmontools/usr/share/smartmontools/smartd-runner
        install -D -m 755 debian/10mail \
                $(CURDIR)/debian/smartmontools/etc/smartmontools/run.d/10mail
-       # for T in paranoid server workstation; do \
-        #      cp debian/smartmontools.logcheck.ignore \
-       #               debian/logcheck.logcheck.ignore.$${T}; \
-       # done
 
 # Build architecture-independent files here.
-binary-indep: build install
+binary-indep:
 # We have nothing to do by default.
 
 # Build architecture-dependent files here.
@@ -98,14 +107,15 @@ binary-arch: build install
        dh_installdocs
        dh_installexamples
        dh_installmenu
-#      dh_installlogrotate
+       dh_installlogrotate
 #      dh_installemacsen
 #      dh_installpam
 #      dh_installmime
-       dh_installinit
+       dh_installinit -- start 20 2 3 4 5 . stop 20 1 .
        dh_installcron
        dh_installman
        dh_installinfo
+       dh_lintian
 #      dh_installlogcheck
 #      dh_undocumented
        dh_installchangelogs CHANGELOG
@@ -122,4 +132,4 @@ binary-arch: build install
        dh_builddeb
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: build clean binary-indep binary-arch binary install configure get-orig-source