summaryrefslogtreecommitdiff
path: root/build-sqmail
diff options
context:
space:
mode:
Diffstat (limited to 'build-sqmail')
-rwxr-xr-xbuild-sqmail59
1 files changed, 30 insertions, 29 deletions
diff --git a/build-sqmail b/build-sqmail
index 17a2372..8b0f108 100755
--- a/build-sqmail
+++ b/build-sqmail
@@ -8,6 +8,7 @@ upname=${name}_$version.orig.tar.gz
srcname=$name-$version
rel_project_root=$name/$name-$version
abs_project_root=$name-$version/$rel_project_root
+orig_project_root=$name-$version.orig/$rel_project_root
qmail_home=var/lib/qmail
wget https://www.fehcom.de/$name/$name-$version.tgz
@@ -226,7 +227,7 @@ END
mkdir debian/contrib
cat <<END >debian/contrib/convert_ids.awk
-# Format of sqmail/sqmail-4.2.24/conf-ids is 'uid:name:description:group:home'
+# Format of sqmail/$srcname/conf-ids is 'uid:name:description:group:home'
BEGIN { FS = ":"; OFS = "\t"; print "# Generated by 'convert_ids.awk'; DO NOT EDIT!" }
/^#/ { next }
\$3 ~ /group/ { print "g", \$2, \$1; next }
@@ -237,7 +238,7 @@ BEGIN { FS = ":"; OFS = "\t"; print "# Generated by 'convert_ids.awk'; DO NOT ED
}
{ exit 1 }
END
-awk -f debian/contrib/convert_ids.awk sqmail/sqmail-4.2.24/conf-ids | expand -t 3,12,26,50 >debian/sysusers
+awk -f debian/contrib/convert_ids.awk sqmail/$srcname/conf-ids | expand -t 3,12,26,50 >debian/sysusers
cat <<'END' >debian/contrib/sqmail-send.service
[Unit]
@@ -466,47 +467,47 @@ Description: Adjust build configuration so that the \`configure' step creates co
END
-cat <<'END' >debian/patches/000-make-ucspissl.patch
+cat <<END >debian/patches/000-make-ucspissl.patch
Author: Jannis M. Hoffmann
Description: replace direct ucspissl.a with libucspissl
---- sqmail-4.2.24.orig/sqmail/sqmail-4.2.24/src/Makefile
-+++ sqmail-4.2.24/sqmail/sqmail-4.2.24/src/Makefile
+--- $orig_project_root/src/Makefile
++++ $abs_project_root/src/Makefile
@@ -900,10 +900,10 @@
- load qmail-smtpam.o control.o now.o dns.o constmap.o \
- ipalloc.o ipme.o quote.o auto_qmail.o tcpto.o \
- tls_timeoutio.o tls_errors.o tls_remote.o dns_tlsa.o \
+ load qmail-smtpam.o control.o now.o dns.o constmap.o \\
+ ipalloc.o ipme.o quote.o auto_qmail.o tcpto.o \\
+ tls_timeoutio.o tls_errors.o tls_remote.o dns_tlsa.o \\
-ssl.lib dns.lib socket.lib qlibs.lib ucspissl.a
+ssl.lib dns.lib socket.lib qlibs.lib
- ./load qmail-smtpam constmap.o control.o dns_tlsa.o \
- tcpto.o now.o dns.o ipalloc.o ipme.o quote.o auto_qmail.o \
-- tls_errors.o tls_remote.o tls_timeoutio.o ucspissl.a \
-+ tls_errors.o tls_remote.o tls_timeoutio.o -lucspissl \
- `cat ssl.lib` `cat dns.lib` `cat socket.lib` `cat qlibs.lib`
+ ./load qmail-smtpam constmap.o control.o dns_tlsa.o \\
+ tcpto.o now.o dns.o ipalloc.o ipme.o quote.o auto_qmail.o \\
+- tls_errors.o tls_remote.o tls_timeoutio.o ucspissl.a \\
++ tls_errors.o tls_remote.o tls_timeoutio.o -lucspissl \\
+ \`cat ssl.lib\` \`cat dns.lib\` \`cat socket.lib\` \`cat qlibs.lib\`
- qmail-smtpam.o: \
-@@ -1048,11 +1048,11 @@ qmail-remote: \
- load qmail-remote.o control.o tcpto.o now.o dns.o ipalloc.o ipme.o \
- quote.o tls_timeoutio.o tls_errors.o tls_remote.o dns_tlsa.o \
- base64.o constmap.o md5c.o hmac_md5.o auto_qmail.o \
+ qmail-smtpam.o: \\
+@@ -1048,11 +1048,11 @@
+ load qmail-remote.o control.o tcpto.o now.o dns.o ipalloc.o ipme.o \\
+ quote.o tls_timeoutio.o tls_errors.o tls_remote.o dns_tlsa.o \\
+ base64.o constmap.o md5c.o hmac_md5.o auto_qmail.o \\
-ssl.lib dns.lib socket.lib qlibs.lib idn2.lib ucspissl.a
+ssl.lib dns.lib socket.lib qlibs.lib idn2.lib
- ./load qmail-remote control.o tcpto.o now.o \
- base64.o constmap.o md5c.o hmac_md5.o ipalloc.o ipme.o \
-- quote.o dns.o ucspissl.a auto_qmail.o dns_tlsa.o \
-- tls_errors.o tls_remote.o tls_timeoutio.o ucspissl.a \
-+ quote.o dns.o auto_qmail.o dns_tlsa.o \
-+ tls_errors.o tls_remote.o tls_timeoutio.o -lucspissl \
- `cat ssl.lib` `cat dns.lib` `cat socket.lib` `cat qlibs.lib` `cat idn2.lib`
+ ./load qmail-remote control.o tcpto.o now.o \\
+ base64.o constmap.o md5c.o hmac_md5.o ipalloc.o ipme.o \\
+- quote.o dns.o ucspissl.a auto_qmail.o dns_tlsa.o \\
+- tls_errors.o tls_remote.o tls_timeoutio.o ucspissl.a \\
++ quote.o dns.o auto_qmail.o dns_tlsa.o \\
++ tls_errors.o tls_remote.o tls_timeoutio.o -lucspissl \\
+ \`cat ssl.lib\` \`cat dns.lib\` \`cat socket.lib\` \`cat qlibs.lib\` \`cat idn2.lib\`
- qmail-remote.o: \
+ qmail-remote.o: \\
END
-cat <<'END' >debian/patches/000-error-narrowing.patch
+cat <<END >debian/patches/000-error-narrowing.patch
Author: Jannis M. Hoffmann <jannis@fehcom.de>
---- sqmail-4.2.24.orig/sqmail/sqmail-4.2.24/src/dkimverify.cpp
-+++ sqmail-4.2.24/sqmail/sqmail-4.2.24/src/dkimverify.cpp
+--- $orig_project_root/src/dkimverify.cpp
++++ $abs_project_root/src/dkimverify.cpp
@@ -377,14 +377,14 @@
unsigned DecodeBase64(char *ptr)
{