Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:p_conrad
netqmail
debian.rules
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File debian.rules of Package netqmail
#!/usr/bin/make -f # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 CFLAGS = -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif NAME=netqmail #DESTDIR=/usr/src/packages/BUILD/debian/$(NAME) DESTDIR=debian/$(NAME) DESTDIR_SMTP=debian/$(NAME)-smtpd DESTDIR_QMTP=debian/$(NAME)-qmtpd DESTDIR_POP3=debian/$(NAME)-pop3d PREFIX=/usr BINDIR=$(PREFIX)/bin ifeq "$(shell uname -m)" "x86_64" LIBDIR=$(PREFIX)/lib64 else LIBDIR=$(PREFIX)/lib endif SBINDIR=$(PREFIX)/sbin MANDIR=$(PREFIX)/share/man DATADIR=$(PREFIX)/share/$(NAME) DOCDIR=$(PREFIX)/share/doc/$(NAME) SYSCONFDIR=/etc RCDIR=$(SYSCONFDIR)/init.d CGIDIR=/src/www/cgi-bin QMAIL_HOME=/var/lib/qmail build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: dh_testdir # Add here commands to compile the package. tar xfz ../SOURCES/qmail-verh-0.07.tar.gz tar xfz ../SOURCES/qmail-mime.tgz tar xfz ../SOURCES/qmail-spp-0.42.tar.gz tar xfz ../SOURCES/dkim.tgz patch -p 0 -s --fuzz=0 <qmail-verh-0.07/qmail-local.diff patch -p 0 -s --fuzz=0 <qmail-send.mime.diff patch -p 0 -s --fuzz=0 <qmail-spp-0.42/netqmail-spp.diff patch -p 1 -s --fuzz=0 <../SOURCES/netqmail-1.06-tls-20141216-local.patch patch -p 0 -s --fuzz=0 <../SOURCES/qmail-1.03-rfc2821-tls.patch patch -p 1 -s --fuzz=0 <../SOURCES/qmail-tls-relayclient.patch patch -p 1 -s --fuzz=0 <../SOURCES/qmail-1.05-tls-openssl098l.patch patch -p 1 -s --fuzz=0 <../SOURCES/qmail-smtpd-502.patch cp "../SOURCES/auto_uids.c" "../SOURCES/auto_uids.h" "../SOURCES/genkey.sh" "../SOURCES/gpl-2.0.txt" "../SOURCES/README.SUSE" . patch -p 0 -s --fuzz=0 <../SOURCES/qmail-dkim.patch grep -v "^extern" alloc.c >tmp && mv tmp alloc.c for i in auto-str.c auto-int8.c auto-int.c qmail-inject.c qmail-pop3d.c qmail-popup.c; do \ sed -i 's= puts= my_puts=g' "$$i"; \ done patch -p 1 -s --fuzz=0 <../SOURCES/netqmail-1.06-ipv6.patch patch -p 1 -s --fuzz=0 <../SOURCES/netqmail-1.06-tls-fixes.patch patch -p 1 -s --fuzz=0 <../SOURCES/netqmail-1.06-authentication075-pc.patch chmod 644 genkey.sh head -100 "../SOURCES/netqmail-1.06-tls-20141216-local.patch" >README.tls echo "Adapted to work with other patches by Peter Conrad <conrad@quisquis.de>" >>README.tls echo "$(QMAIL_HOME)" >conf-qmail (echo mail; echo nofiles) >conf-groups echo gcc $(CFLAGS) -fpie -include errno.h -include string.h -include stdio.h -include unistd.h -include sys/socket.h -include stdlib.h -include sys/stat.h -include sys/types.h -include utime.h -include grp.h -DTLS >conf-cc echo gcc $(CFLAGS) -pie >conf-ld echo >readwrite.h make load sed -i 's=}$$=} -lsyncdir=' load make auto-uid auto-gid touch auto_uids.c make it man # --- end custom part for compiling touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp # Add here commands to clean up after the build process. rm -rf `cat TARGETS` rm -rf $(DESTDIR) $(DESTDIR_SMTP) $(DESTDIR_QMTP) $(DESTDIR_POP3) # --- end custom part for cleaning up dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs # Add here commands to install the package # The DESTDIR Has To Be Exactly /usr/src/packages/BUILD/debian/<nameOfPackage> mkdir -p "$(DESTDIR)$(DOCDIR)" mkdir -p "$(DESTDIR)/usr/lib/qmail" grep ' d(.*[0-9]);' hier.c | grep -v '"man' \ | sed 's=^[^"]*"==;s="[^0]*= =;s=[^0-9]*$$==' \ | while read name mode; do \ mkdir -p -m 0755 "$(DESTDIR)$(QMAIL_HOME)/$$name"; \ if [ "$$mode" != "0755" ]; then echo chmod "$$mode" "$(QMAIL_HOME)/$$name"; fi; \ done >>debian/postinst grep ' dsplit(.*[0-9]);' hier.c \ | sed 's=^[^"]*"==;s="[^0]*= =;s=[^0-9]*$$==' \ | while read name mode; do \ for i in $$(seq 0 $$(($$(head -1 conf-split) - 1))); do \ mkdir -p -m 0755 "$(DESTDIR)$(QMAIL_HOME)/$$name/$$i"; \ if [ "$$mode" != "0755" ]; then echo chmod "$$mode" "$(QMAIL_HOME)/$$name/$$i"; fi; \ done; \ done >>debian/postinst grep ' z(.*[0-9]);' hier.c | grep -v tcpto \ | sed 's=^[^"]*"==;s=",= =;s=,[^0]*,= =;s=[^0-9]*$$==' \ | while read name len mode; do \ head -c $$len </dev/zero >"$(DESTDIR)$(QMAIL_HOME)/$$name"; \ echo chmod "$$mode" "$(QMAIL_HOME)/$$name"; \ done >>debian/postinst grep ' c(.*[0-9]);' hier.c | grep -v 'man/cat' \ | sed 's=^[^"]*"==;s=","= =;s="[^0]*= =;s=[^0-9]*$$==' \ | while read dest file mode; do \ case "$$dest" in \ man*) mkdir -p "$(DESTDIR)$(MANDIR)$${dest#man}"; \ suff=; \ if [ "$$file" = "maildirmake.1" -o "$$file" = "maildir.5" -o "$$file" = "tcp-environ.5" -o "$$file" = "mbox.5" ]; then \ suff=q; \ fi; \ install -m "$$mode" "$$file" "$(DESTDIR)$(MANDIR)$${dest#man}/$$file$$suff"; \ ;; \ doc) install -m 0644 "$$file" "$(DESTDIR)$(DOCDIR)"; \ ;; \ bin) install -m "$$mode" "$$file" "$(DESTDIR)/usr/lib/qmail/"; \ if [ "$$mode" != "0755" ]; then echo chmod "$$mode" "/usr/lib/qmail/$$file"; fi; \ ;; \ *) install -m "$$mode" "$$file" "$(DESTDIR)$(QMAIL_HOME)/$$dest/"; \ esac; \ done | grep -vE 'qmail-(popup|remote)' >>debian/postinst cp ../SOURCES/install_replace . chmod 0755 install_replace mkdir -p "$(DESTDIR)/var/spool" rmdir "$(DESTDIR)$(QMAIL_HOME)/bin" ln -s "/usr/lib/qmail" "$(DESTDIR)$(QMAIL_HOME)/bin" mv "$(DESTDIR)$(QMAIL_HOME)/boot" "$(DESTDIR)/usr/lib/qmail" mv "$(DESTDIR)$(QMAIL_HOME)/queue" "$(DESTDIR)/var/spool/qmail-queue" ln -s "/var/spool/qmail-queue" "$(DESTDIR)$(QMAIL_HOME)/queue" mkdir -p "$(DESTDIR)$(SYSCONFDIR)/qmail/control/tlshosts" mkdir -p "$(DESTDIR)$(SYSCONFDIR)/qmail/control/notlshosts" mkdir -p "$(DESTDIR)$(RCDIR)" mkdir -p "$(DESTDIR)/usr/lib" mkdir -p "$(DESTDIR)/$(BINDIR)" for i in bouncesaying condredirect except forward maildir2mbox maildirmake \ maildirwatch mailsubj preline qbiff qmail-inject qmail-qmqpc \ qreceipt ; do \ ln -s "/usr/lib/qmail/$$i" "$(DESTDIR)/$(BINDIR)/"; \ done mkdir -p "$(DESTDIR)/$(SBINDIR)" for i in dkim-genkey qmail-newmrh qmail-newu qmail-pw2u qmail-qread \ qmail-qstat qmail-showctl qmail-tcpok qmail-tcpto ; do \ ln -s "/usr/lib/qmail/$$i" "$(DESTDIR)/$(SBINDIR)/"; \ done mkdir -p "$(DESTDIR_SMTP)$(SYSCONFDIR)/default" mkdir -p "$(DESTDIR_SMTP)/$(MANDIR)/man8" mkdir -p "$(DESTDIR_QMTP)/$(MANDIR)/man8" mkdir -p "$(DESTDIR_POP3)/$(MANDIR)/man8" mkdir -p "$(DESTDIR_SMTP)/$(QMAIL_HOME)" mkdir -p "$(DESTDIR_SMTP)/$(SBINDIR)" mkdir -p "$(DESTDIR_QMTP)/$(SBINDIR)" mkdir -p "$(DESTDIR_POP3)/$(SBINDIR)" mkdir -p "$(DESTDIR_SMTP)/$(SYSCONFDIR)" mkdir -p "$(DESTDIR_QMTP)/$(SYSCONFDIR)" mkdir -p "$(DESTDIR_POP3)/$(SYSCONFDIR)" mkdir -p "$(DESTDIR_SMTP)/usr/lib/qmail" mkdir -p "$(DESTDIR_QMTP)/usr/lib/qmail" mkdir -p "$(DESTDIR_POP3)/usr/lib/qmail" ./install_replace "../SOURCES/qmail-send-initscript" "$(RCDIR)/netqmail" 0755 $(DESTDIR) ln -s "$(RCDIR)/netqmail" "$(DESTDIR)/$(SBINDIR)/rcnetqmail" ./install_replace "../SOURCES/qmail-mtp-initscript" "$(RCDIR)/netqmail-smtpd" 0755 $(DESTDIR_SMTP) ln -s "$(RCDIR)/netqmail-smtpd" "$(DESTDIR_SMTP)/$(SBINDIR)/rcnetqmail-smtpd" ./install_replace "../SOURCES/qmail-qmtp-initscript" "$(RCDIR)/netqmail-qmtpd" 0755 $(DESTDIR_QMTP) ln -s "$(RCDIR)/netqmail-qmtpd" "$(DESTDIR_QMTP)/$(SBINDIR)/rcnetqmail-qmtpd" ./install_replace "../SOURCES/qmail-pop3-initscript" "$(RCDIR)/netqmail-pop3d" 0755 $(DESTDIR_POP3) ln -s "$(RCDIR)/netqmail-pop3d" "$(DESTDIR_POP3)/$(SBINDIR)/rcnetqmail-pop3d" install -m 0755 "../SOURCES/start-pop3-tcpserver" "$(DESTDIR_POP3)/usr/lib/qmail/" install -m 0644 "../SOURCES/tcprules.smtpd" "$(DESTDIR_SMTP)$(SYSCONFDIR)/tcprules.smtpd" install -m 0644 "../SOURCES/sysconfig.netqmail" "$(DESTDIR_SMTP)$(SYSCONFDIR)/default/netqmail" tcprules <"$(DESTDIR_SMTP)$(SYSCONFDIR)/tcprules.smtpd" "$(DESTDIR_SMTP)$(SYSCONFDIR)/tcprules.smtpd.cdb" "$(DESTDIR_SMTP)$(SYSCONFDIR)/tcprules.smtpd.tmp" cp "$(DESTDIR_SMTP)$(SYSCONFDIR)"/tcprules.smtpd "$(DESTDIR_QMTP)$(SYSCONFDIR)"/tcprules.qmtpd cp "$(DESTDIR_SMTP)$(SYSCONFDIR)"/tcprules.smtpd.cdb "$(DESTDIR_QMTP)$(SYSCONFDIR)"/tcprules.qmtpd.cdb cp "$(DESTDIR_SMTP)$(SYSCONFDIR)"/tcprules.smtpd "$(DESTDIR_POP3)$(SYSCONFDIR)"/tcprules.pop3d cp "$(DESTDIR_SMTP)$(SYSCONFDIR)"/tcprules.smtpd.cdb "$(DESTDIR_POP3)$(SYSCONFDIR)"/tcprules.pop3d.cdb rmdir "$(DESTDIR)$(QMAIL_HOME)/control" ln -s "$(SYSCONFDIR)/qmail/control" "$(DESTDIR)$(QMAIL_HOME)/control" ./install_replace "../SOURCES/smtpplugins" "$(SYSCONFDIR)/qmail/control/smtpplugins" 0644 $(DESTDIR_SMTP) cp "$(DESTDIR)/usr/lib/qmail/sendmail" "$(DESTDIR)$(SBINDIR)" ln -s "$(SBINDIR)/sendmail" "$(DESTDIR)$(PREFIX)/lib" ln -sf "$(SBINDIR)/sendmail" "$(DESTDIR)/usr/lib/qmail/sendmail" mkdir -p -m 0750 "$(DESTDIR_SMTP)$(SYSCONFDIR)/qmail/env" mkdir -p -m 0755 "$(DESTDIR_SMTP)/usr/lib/qmail/plugins" ln -s "/usr/lib/qmail/plugins" "$(DESTDIR_SMTP)$(QMAIL_HOME)" mkdir -p -m 0755 "$(DESTDIR)$(SYSCONFDIR)/skel" "$(DESTDIR)/usr/lib/qmail/maildirmake" "$(DESTDIR)$(SYSCONFDIR)/skel/Maildir" mv "$(DESTDIR)/usr/lib/qmail/qmail-remote" "$(DESTDIR)/usr/lib/qmail/qmail-remote.real" mkdir -p -m 0750 "$(DESTDIR)$(SYSCONFDIR)/qmail/dkim" ./install_replace dkim/qmail-remote "/usr/lib/qmail/qmail-remote" 751 $(DESTDIR) ./install_replace "../SOURCES/dkim-genkey.sh" "/usr/lib/qmail/dkim-genkey" 755 $(DESTDIR) ./install_replace "../SOURCES/signconf.xml" "$(SYSCONFDIR)/qmail/dkim/signconf.xml" 644 $(DESTDIR) mkdir -p "$(DESTDIR)$(SYSCONFDIR)/cron.daily" ./install_replace "../SOURCES/qmail-tls.cron" "$(SYSCONFDIR)/cron.daily/quisquis.de-qmail-tls" 755 $(DESTDIR) mkdir -p "$(DESTDIR_POP3)$(SYSCONFDIR)/pam.d" install -m 0644 "../SOURCES/pop3.pam" "$(DESTDIR_POP3)$(SYSCONFDIR)/pam.d/pop3" ./install_replace "../SOURCES/dkim-genkey.8" "$(MANDIR)/man8/dkim-genkey.8" 644 $(DESTDIR) mv "$(DESTDIR)/usr/lib/qmail/qmail-smtpd"* "$(DESTDIR_SMTP)/usr/lib/qmail/" mv "$(DESTDIR)$(MANDIR)/man8/qmail-smtpd"* "$(DESTDIR_SMTP)$(MANDIR)/man8/" mv "$(DESTDIR)/usr/lib/qmail/qmail-qmtpd"* "$(DESTDIR_QMTP)/usr/lib/qmail/" mv "$(DESTDIR)$(MANDIR)/man8/qmail-qmtpd"* "$(DESTDIR_QMTP)$(MANDIR)/man8/" mv "$(DESTDIR)/usr/lib/qmail/qmail-pop"* "$(DESTDIR_POP3)/usr/lib/qmail/" mv "$(DESTDIR)$(MANDIR)/man8/qmail-pop"* "$(DESTDIR_POP3)$(MANDIR)/man8/" # --- end custom part for installing # 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_installdebconf dh_installdocs genkey.sh README.tls README.SUSE gpl-2.0.txt README.auth LICENSE.authentication dh_installexamples dh_installmenu # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime # dh_installinit dh_installcron dh_installman dh_installinfo # dh_undocumented dh_installchangelogs dh_link dh_strip --dbg-package=$(NAME)-dbg dh_compress dh_fixperms # dh_makeshlibs dh_installdeb # dh_perl dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor