2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2023 Friedrich Kink
16 %patch% 01-no-MaxMind.patch
17 %patch% 02-dnsbl_subtests-run_net_tests.patch
18 %patch% 03-no-IO-Socket-INET6.patch
21 %file% spamassassin.xml
24 # see the PACKAGING file
25 CONFIGURE_OPTIONS += INSTALLDIRS=vendor
26 CONFIGURE_OPTIONS += CONTACT_ADDRESS=postmaster@example.com
27 CONFIGURE_OPTIONS += SYSCONFDIR=/etc
28 CONFIGURE_OPTIONS += DATADIR=/usr/share/spamassassin
29 CONFIGURE_OPTIONS += LOCALSTATEDIR=/var/spamassassin
30 CONFIGURE_OPTIONS += ENABLE_SSL=yes
31 CONFIGURE_OPTIONS += CONFIGURE="\$$(PERL_BIN) spamc/configure.pl LDFLAGS=-L$(OPENSSL_LIBDIR) CFLAGS=-I$(OPENSSL_INCDIR)"
32 CONFIGURE_OPTIONS += < /dev/null
34 # install spamassassin
35 COMPONENT_POST_INSTALL_ACTION += \
36 $(MKDIR) $(PROTO_DIR)/lib/svc/method ; \
37 $(CP) $(COMPONENT_DIR)/files/spamassassin $(PROTO_DIR)/lib/svc/method ;
38 # install spamassassin.xml
39 COMPONENT_POST_INSTALL_ACTION += \
40 $(MKDIR) $(PROTO_DIR)/lib/svc/manifest/network ; \
41 $(CP) $(COMPONENT_DIR)/files/spamassassin.xml $(PROTO_DIR)/lib/svc/manifest/network ;
43 # move unversioned files to unversioned package
44 grep -v 'PERLVER' "$DISTRIBUTION-PERLVER.p5m" \
45 | egrep '^#|^file path|^license|^$' \
46 | (gsed -u -e '/^\(#.*\)\{0,1\}$/!q' ; grep -v '^#') \
48 > "$DISTRIBUTION-GENFRAG.p5m"
49 MANIFEST="$MANIFEST $DISTRIBUTION-GENFRAG.p5m"
51 # remove unversioned files from versioned packages
52 sed -i -e '/^file path/{/PERLVER/!d;}' "$DISTRIBUTION-PERLVER.p5m"