summaryrefslogtreecommitdiff
path: root/misc/rpm
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-06-18 10:24:49 +0000
committerjlam <jlam@pkgsrc.org>2001-06-18 10:24:49 +0000
commit53a25b886fa1bab69a742f2d8324cc1e6fee825f (patch)
tree9c2ac293eb28b9f13d4a7a0534bf651188c900d6 /misc/rpm
parentdf9dd07e418e9c15a1c52998b00078d60fe9ea85 (diff)
downloadpkgsrc-53a25b886fa1bab69a742f2d8324cc1e6fee825f.tar.gz
Add buildlink.mk file for use by other package Makefiles.
Diffstat (limited to 'misc/rpm')
-rw-r--r--misc/rpm/buildlink.mk33
1 files changed, 33 insertions, 0 deletions
diff --git a/misc/rpm/buildlink.mk b/misc/rpm/buildlink.mk
new file mode 100644
index 00000000000..bf8adcff517
--- /dev/null
+++ b/misc/rpm/buildlink.mk
@@ -0,0 +1,33 @@
+# $NetBSD: buildlink.mk,v 1.1 2001/06/18 10:24:49 jlam Exp $
+#
+# This Makefile fragment is included by packages that use rpm.
+#
+# To use this Makefile fragment, simply:
+#
+# (1) Optionally define RPM_REQD to the version of rpm desired.
+# (2) Include this Makefile fragment in the package Makefile,
+# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header
+# search path, and
+# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search
+# path.
+
+.if !defined(RPM_BUILDLINK_MK)
+RPM_BUILDLINK_MK= # defined
+
+# This adds a build-dependency as rpm only has a static library.
+RPM_REQD?= 2.4.3
+BUILD_DEPENDS+= rpm>=${RPM_REQD}:../../misc/rpm
+
+BUILDLINK_PREFIX.rpm= ${LOCALBASE}
+BUILDLINK_FILES.rpm= include/rpm/*
+BUILDLINK_FILES.rpm+= lib/librpm.a
+
+BUILDLINK_TARGETS.rpm= rpm-buildlink
+BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.rpm}
+
+pre-configure: ${BUILDLINK_TARGETS.rpm}
+rpm-buildlink: _BUILDLINK_USE
+
+.include "../../mk/bsd.buildlink.mk"
+
+.endif # RPM_BUILDLINK_MK