overdue commit lots of changes
[buildscripts] / exim
1 #!/bin/bash
2 # I, Ian Kelling, follow the GNU license recommendations at
3 # https://www.gnu.org/licenses/license-recommendations.en.html. They
4 # recommend that small programs, < 300 lines, be licensed under the
5 # Apache License 2.0. This file contains or is part of one or more small
6 # programs. If a small program grows beyond 300 lines, I plan to switch
7 # its license to GPL.
8
9 # Copyright 2024 Ian Kelling
10
11 # Licensed under the Apache License, Version 2.0 (the "License");
12 # you may not use this file except in compliance with the License.
13 # You may obtain a copy of the License at
14
15 # http://www.apache.org/licenses/LICENSE-2.0
16
17 # Unless required by applicable law or agreed to in writing, software
18 # distributed under the License is distributed on an "AS IS" BASIS,
19 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 # See the License for the specific language governing permissions and
21 # limitations under the License.
22
23
24 # libgcrypt-dev is a test dependency
25 # libidn11-dev is some build dep for newer version not in
26 apt-get install -y libopendmarc-dev libspf2-dev libgcrypt-dev libidn11-dev
27
28
29 apt-get -y build-dep exim4/etiona
30 # https://wiki.debian.org/BuildingAPackage
31 apt-get install build-essential dpatch fakeroot devscripts equivs lintian quilt
32
33 cd /a/opt/exim/src
34 # created by using make wrapper /b/make-wrap and building the exim package
35 #. /a/opt/dexim/iank-debian-make-env
36
37 declare -x LC_ALL='C'
38 declare -x PERL_USE_UNSAFE_INC='1'
39 declare -x CFLAGS='-g -O2 -D_LARGEFILE_SOURCE -fno-strict-aliasing -Wall '
40 make
41 # copy src/Local/Makefile from debian experimental package into local repo,
42
43 # for running the tests,
44 # edit src/Local/Makefile to remove ref: from EXIM_USER and EXIM_GROUP,
45 # then change CONFIGURE_OWNER and CONGIGURE_USER to the default ones that
46 # will be used when creating /a/opt/exim/test/test-config (iank/user2)
47 # echo /a/opt/exim/test/test-config | s dd of=/etc/exim4/trusted_configs
48 # edit /etc/hostname to be an fqdn, then hostname -F /etc/hostname. after
49 # running a single test, change this back, its cached in test/dnszones, and
50 # if you need to update that cache, rm -rf that dir.
51
52 ##### the following just patches the flidas package to have dmarc support
53
54 # mkct
55 # apt-get source exim4/etiona
56
57 # # to just patch heavy:
58 # # first apply below patch, then build, then
59 # #diff -u ./EDITME.exim4-light ./EDITME.exim4-heavy > /tmp/EDITME.exim4-heavy.diff
60 # # remove extraneous differences
61 # # meld ./debian/EDITME.exim4-heavy.diff /tmp/EDITME.exim4-heavy.diff
62 # # diff -u ./debian/EDITME.exim4-heavy.diff /tmp/EDITME.exim4-heavy.diff
63 # # edit the diff to get filenames right.
64
65
66 # patch -p0 <<'EOF'
67 # --- ./exim4-4.86.2/src/EDITME.orig 2019-07-31 11:34:22.284977059 -0400
68 # +++ ./exim4-4.86.2/src/EDITME 2019-07-31 11:35:01.361206192 -0400
69 # @@ -445,9 +445,9 @@
70 # # installed on your system (www.libspf2.org). Depending on where it is installed
71 # # you may have to edit the CFLAGS and LDFLAGS lines.
72
73 # -# EXPERIMENTAL_SPF=yes
74 # -# CFLAGS += -I/usr/local/include
75 # -# LDFLAGS += -lspf2
76 # +EXPERIMENTAL_SPF=yes
77 # +CFLAGS += -I/usr/local/include
78 # +LDFLAGS += -lspf2
79
80 # # Uncomment the following lines to add SRS (Sender rewriting scheme) support.
81 # # You need to have libsrs_alt installed on your system (srs.mirtol.com).
82 # @@ -469,9 +469,9 @@
83
84 # # Uncomment the following line to add DMARC checking capability, implemented
85 # # using libopendmarc libraries.
86 # -# EXPERIMENTAL_DMARC=yes
87 # -# CFLAGS += -I/usr/local/include
88 # -# LDFLAGS += -lopendmarc
89 # +EXPERIMENTAL_DMARC=yes
90 # +CFLAGS += -I/usr/local/include
91 # +LDFLAGS += -lopendmarc
92
93
94 # # Uncomment the following line to support Events,
95 # EOF
96
97 # cd exim4-4.86.2
98 # fakeroot debian/rules binary