1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-21 18:25:41 +03:00
aports/testing/clapf/ldflags.patch
Przemyslaw Pawelczyk 071c1400c2 testing/clapf: Fix a lot of problems.
* APKBUILD: Leverage default_prepare and use builddir (no _).
* APKBUILD: Update url and source url.
            Original tar seems not available anymore and there are no
            tags in clapf's bitbucket repository, so use commit marked
            as release of version that was shipped before.
* APKBUILD: Introduce some constants for better DRY-ness,
            reformat package() function, create there a workdir
            (otherwise clapf won't start) and fix permissions.
* APKBUILD: make -j1 is deliberate, as it fails with more jobs,
            but I am not willing to spend any more time on this package.
* ldflags.patch: Set soname (otherwise -dev subpkg will haunt you).
* clapf.confd: Make it somewhat usable. TMPDIR seemed useless.
* clapf.initd: Rewrite using openrc-run default ssd functions.
* clapf.pre-install: Change user and group to clapf.

It has not been tested with mta, but at least it starts now if you have
virus databases present.  Run freshclam if you don't have them yet.
2016-06-20 13:35:25 +00:00

38 lines
1.8 KiB
Diff

diff --git a/src/Makefile.in b/src/Makefile.in
index 9512aca..6b4388e 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -17,7 +17,7 @@
CFLAGS = @CFLAGS@ @CPPFLAGS@
DEFS = @defs@
INCDIR = -I. -I.. @INCDIR@ @sql_includes@
-LIBDIR = -L. -L../contrib/spamsum @LIBDIR@ @LDFLAGS@
+LIBDIR = -L. -L../contrib/spamsum @LIBDIR@
LIBS = @LIBS@ @sql_libs@
##CLAMAV_EXTRA_LIBS = -lclamunrar_iface -lclamunrar
OBJS = @OBJS@
@@ -40,13 +40,12 @@ install: install-clapf install-includes install-splitmbox @parsembox_install@ @s
clapf: clapf.c libclapf.a
- $(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ clapf.c -lclapf $(LIBS) $(LDAP_LIBS) $(LIBDIR) @LDFLAGS@ @libclamav_extra_libs@
+ $(CC) $(CFLAGS) $(INCDIR) $(DEFS) @LDFLAGS@ -o $@ clapf.c -lclapf $(LIBS) $(LDAP_LIBS) $(LIBDIR) @libclamav_extra_libs@
libclapf.a: $(OBJS) $(SQL_OBJS)
ar cr libclapf.a $(OBJS) $(SQL_OBJS)
ranlib libclapf.a
- #$(CC) -shared -Wl,-soname,libclapf.so.$(CLAPF_VERSION) -o libclapf.so.$(LIBCLAPF_VERSION) $(OBJS) $(SQL_OBJS) $(LIBS) $(LDAP_LIBS) @LDFLAGS@
- $(CC) -shared -Wl -o libclapf.so.$(LIBCLAPF_VERSION) $(OBJS) $(SQL_OBJS) $(LIBS) $(LDAP_LIBS) @LDFLAGS@
+ $(CC) @LDFLAGS@ -shared -Wl,-soname,libclapf.so.$(CLAPF_VERSION) -o libclapf.so.$(LIBCLAPF_VERSION) $(OBJS) $(SQL_OBJS) $(LIBS) $(LDAP_LIBS)
ln -sf libclapf.so.$(LIBCLAPF_VERSION) libclapf.so
ln -sf libclapf.so.$(LIBCLAPF_VERSION) libclapf.so.$(CLAPF_VERSION)
@@ -75,7 +75,7 @@
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $^ $(LIBS) $(LDAP_LIBS) $(LIBDIR) -ltre
test:
- $(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o spamtest $(srcdir)/test.c -lclapf $(LIBS) $(LDAP_LIBS) @spamsum_libs@ $(LIBDIR) @LDFLAGS@
+ $(CC) $(CFLAGS) $(INCDIR) $(DEFS) @LDFLAGS@ -o spamtest $(srcdir)/test.c -lclapf $(LIBS) $(LDAP_LIBS) @spamsum_libs@ $(LIBDIR)
%.o: $(srcdir)/%.c
$(CC) $(CFLAGS) -fPIC $(INCDIR) $(DEFS) -c $< -o $@