From 7cd919bade9722ad8394be41fe3f106f4e7b193f Mon Sep 17 00:00:00 2001
From: Ivan Rako <irako@nekkar.carnet.hr>
Date: Fri, 22 Apr 2011 13:33:45 +0200
Subject: [PATCH] novi debian/rules i novi debian/copyright

---
 debian/conffiles      |    1 -
 debian/control        |    2 +-
 debian/copyright      |    6 ++--
 debian/postinst       |    2 +-
 debian/rules          |   87 ++-----------------------------------------------
 make-aliases-gecos.sh |    5 +--
 6 files changed, 8 insertions(+), 95 deletions(-)
 delete mode 100644 debian/conffiles

diff --git a/debian/conffiles b/debian/conffiles
deleted file mode 100644
index 5f85af8..0000000
--- a/debian/conffiles
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/postfix-cn/make-aliases-gecos.sh
diff --git a/debian/control b/debian/control
index 160681e..7cbe12c 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Standards-Version: 3.6.1
 
 Package: postfix-cn
 Architecture: all
-Depends: postfix (>= 2.5.5-1.1), carnet-tools-cn (>= 2.7), sasl2-bin (>= 2.1.22), libsasl2-modules (>=  2.1.22), debconf, openssl
+Depends: postfix (>= 2.5.5-1.1), carnet-tools-cn (>= 2.7), sasl2-bin (>= 2.1.22), libsasl2-modules (>=  2.1.22), debconf, openssl, adduser
 Conflicts: sendmail-cn, amavisd-cn (<< 2:20030616p10-10), amavisd-new-milter, sendmail-base
 Suggests: amavisd-cn
 Description: A high-performance mail transport agent
diff --git a/debian/copyright b/debian/copyright
index e3933e7..28add9f 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,7 +1,7 @@
-This package is copyright (c) by CARNet <paketi@carnet.hr>.
+Copyright 2006 CARNet <paketi@carnet.hr>
 
-You are free to distribute this software under the terms of
-the GNU General Public License.
+You are free to distribute this software package under the terms of the
+GNU General Public License.
 
 On Debian systems, the complete text of the GNU General Public
 License can be found in the file /usr/share/common-licenses/GPL.
diff --git a/debian/postinst b/debian/postinst
index fcdaf01..110ec6c 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -274,7 +274,7 @@ $fqdn
 root@$mailname
 +
   ln -sf "$cert.pem" `openssl x509 -noout -hash < "$cert.pem"`.0
-  chown root.root "/etc/ssl/certs/$cert.pem"
+  chown root:root "/etc/ssl/certs/$cert.pem"
   chmod 0640 "/etc/ssl/certs/$cert.pem"
 fi
 
diff --git a/debian/rules b/debian/rules
index c2a8974..cbe925d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,86 +1,3 @@
 #!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-configure: configure-stamp
-configure-stamp:
-	dh_testdir
-	# Add here commands to configure the package.
-
-	touch configure-stamp
-
-
-build: build-stamp
-
-build-stamp: configure-stamp 
-	dh_testdir
-
-	# Add here commands to compile the package.
-	# $(MAKE)
-
-	touch build-stamp
-
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp configure-stamp
-
-	# Add here commands to clean up after the build process.
-	# -$(MAKE) clean
-
-	dh_clean 
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_clean -k 
-	dh_installdirs
-
-	# Add here commands to install the package into debian/postfix-cn.
-	# $(MAKE) install DESTDIR=$(CURDIR)/debian/postfix-cn
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs -k
-	dh_installdocs
-#	dh_installexamples
-	dh_install
-#	dh_installmenu
-	dh_installdebconf	
-#	dh_installlogrotate
-#	dh_installemacsen
-#	dh_installpam
-#	dh_installmime
-#	dh_installinit
-	dh_installcron
-#	dh_installinfo
-	dh_installman
-#	dh_link
-#	dh_strip
-#	dh_compress
-	dh_fixperms
-#	dh_perl
-#	dh_python
-#	dh_makeshlibs
-	dh_installdeb
-#	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+%:
+	dh $@
diff --git a/make-aliases-gecos.sh b/make-aliases-gecos.sh
index b26364c..f831cf4 100755
--- a/make-aliases-gecos.sh
+++ b/make-aliases-gecos.sh
@@ -2,9 +2,6 @@
 
 set -e
 
-# ovo se moze otkomentirati, ako se ne zele poruke o duplim GECOS aliasima
-#PA_OPTIONS="-r"
-
 PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
 
 [ -x /usr/sbin/postalias ] || exit 0
@@ -29,7 +26,7 @@ getent passwd | awk -F: '
 
 if ! cmp -s $gecos.dpkg-tmp.$$ $gecos > /dev/null; then
   cp_mv $gecos.dpkg-tmp.$$ $gecos
-  postalias $PA_OPTIONS hash:$gecos
+  postalias hash:$gecos
 else
   rm -f $gecos.dpkg-tmp.$$
 fi
-- 
1.7.10.4