Subject: Proposed change to news/inn
To: None <tech-pkg@netbsd.org>
From: Quentin Garnier <netbsd@quatriemek.com>
List: tech-pkg
Date: 05/07/2003 21:16:44
Hi,
Sometimes ago I managed to make a package for newsx, a tool to pull news
from a distant server to a local one, a bit like suck.
But newsx uses the static libraries installed by inn, so I added a
buildlink2.mk file to the inn packages, as long as a Makefile.common to
hold the path were inn is installed.
I imported newsx into pkgsrc-wip, along with the patch. I also include it
there so it can reviewed easily.
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/news/inn/Makefile,v
retrieving revision 1.41
diff -u -r1.41 Makefile
--- Makefile 2003/03/23 11:07:15 1.41
+++ Makefile 2003/05/07 19:01:54
@@ -16,15 +16,14 @@
PATCHFILES= inn-2.3.4-v6-20030201.diff.gz
PATCH_DIST_STRIP= -p1
-INN_DATA_DIR?= /var/news
-INN_SPOOL?= ${INN_DATA_DIR}/spool
+.include "Makefile.common"
BUILD_DEFS+= INN_DATA_DIR
FILES_SUBST+= INN_DATA_DIR=${INN_DATA_DIR}
USE_BUILDLINK2= YES
USE_PKGINSTALL= YES
GNU_CONFIGURE= YES
-GNU_CONFIGURE_PREFIX= ${PREFIX}/inn
+GNU_CONFIGURE_PREFIX= ${INN_PREFIX}
CONFIGURE_ARGS+= --enable-setgid-inews \
--enable-uucp-rnews \
--mandir=${PREFIX}/man \
@@ -108,6 +107,11 @@
post-install:
${RM} -f ${PREFIX}/bin/inews
${LN} -s ../inn/bin/inews ${PREFIX}/bin/inews
+ ${INSTALL_DATA_DIR} ${PREFIX}/include/inn
+ ${INSTALL_DATA} ${WRKSRC}/include/config.h ${PREFIX}/include/inn
+ ${INSTALL_DATA} ${WRKSRC}/include/dbz.h ${PREFIX}/include/inn
+ ${INSTALL_DATA} ${WRKSRC}/include/libinn.h ${PREFIX}/include/inn
+ ${INSTALL_DATA} ${WRKSRC}/include/storage.h ${PREFIX}/include/inn
${INSTALL_DATA_DIR} ${EXAMPLEDIR}
for FILE in `ls -1 ${WRKSRC}/samples/* | \
${EGREP} -v '(Makefile|.*\.(in|orig)$$)'`; do \
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/news/inn/PLIST,v
retrieving revision 1.4
diff -u -r1.4 PLIST
--- PLIST 2002/09/29 10:39:36 1.4
+++ PLIST 2003/05/07 19:01:54
@@ -1,6 +1,10 @@
@comment $NetBSD: PLIST,v 1.4 2002/09/29 10:39:36 jlam Exp $
bin/inews
etc/rc.d/innd
+include/inn/config.h
+include/inn/dbz.h
+include/inn/libinn.h
+include/inn/storage.h
inn/bin/actmerge
inn/bin/actsync
inn/bin/actsyncd
@@ -251,6 +255,7 @@
share/examples/inn/version
share/examples/inn/version.pl
@dirrm share/examples/inn
+@dirrm include/inn
@dirrm inn/lib
@dirrm inn/bin/rnews.libexec
@dirrm inn/bin/filter
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/news/inn/distinfo,v
retrieving revision 1.6
diff -u -r1.6 distinfo
--- distinfo 2003/03/23 11:07:16 1.6
+++ distinfo 2003/05/07 19:01:54
@@ -12,3 +12,4 @@
SHA1 (patch-af) = 49ce07f3d2b2cc17b91f48ee4e9c7044695a2919
SHA1 (patch-ag) = 1087421f2a893c030d5299850b0ad0c4f6a37ecd
SHA1 (patch-ah) = f7ed6195149c03551a5e5d7bb1d5a24bc71bb48c
+SHA1 (patch-ai) = d09c6dd78677f0336f9f4b2911287b4e6f69ebd2
--- /dev/null 2003-05-07 20:56:22.000000000 +0200
+++ patches/patch-ai 2003-04-06 13:39:05.000000000 +0200
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- include/dbz.h.orig 2002-12-23 00:00:38.000000000 +0100
++++ include/dbz.h
+@@ -42,7 +42,7 @@ typedef struct {
+ BOOL nonblock;
+ } dbzoptions;
+
+-#ifdef __GNUC__
++#if defined(__GNUC__) && !defined(PACKED)
+ #define PACKED __attribute__ ((packed))
+ #else
+ #if !defined(PACKED)
--- /dev/null 2003-05-07 20:56:22.000000000 +0200
+++ Makefile.common 2003-03-29 10:08:08.000000000 +0100
@@ -0,0 +1,6 @@
+# $NetBSD$
+#
+
+INN_PREFIX?= ${PREFIX}/inn
+INN_DATA_DIR?= /var/news
+INN_SPOOL?= ${INN_DATA_DIR}/spool
--- /dev/null 2003-05-07 20:56:22.000000000 +0200
+++ buildlink2.mk 2003-04-06 13:04:45.000000000 +0200
@@ -0,0 +1,27 @@
+# $NetBSD$
+#
+# This Makefile fragment is included by packages that use inn.
+#
+# This file was created automatically using createbuildlink 2.5.
+#
+
+.if !defined(INN_BUILDLINK2_MK)
+INN_BUILDLINK2_MK= # defined
+
+BUILDLINK_PACKAGES+= inn
+BUILDLINK_DEPENDS.inn?= inn>=2.3.4
+BUILDLINK_PKGSRCDIR.inn?= ../../news/inn
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.inn=inn
+BUILDLINK_PREFIX.inn_DEFAULT= ${LOCALBASE}
+BUILDLINK_FILES.inn= inn/lib/libinn.a
+BUILDLINK_FILES.inn+= inn/lib/libstorage.a
+BUILDLINK_FILES.inn+= include/inn/*
+
+.include "../../lang/perl5/buildlink2.mk"
+
+BUILDLINK_TARGETS+= inn-buildlink
+
+inn-buildlink: _BUILDLINK_USE
+
+.endif # INN_BUILDLINK2_MK
--
Quentin Garnier - cube@cubidou.net
"Feels like I'm fiddling while Rome is burning down.
Should I lay my fiddle down and take a rifle from the ground ?"
Leigh Nash/Sixpence None The Richer, Paralyzed, Divine Discontents, 2002.