summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2011-05-22 22:41:09 +0000
committerabs <abs@pkgsrc.org>2011-05-22 22:41:09 +0000
commitbead61245218e415239b116d6f56cd65d437fb82 (patch)
treec5a716c8a205b3f1276576e510090837b1e69570 /net
parent218dd7c5bcf7ca8d26dc82811d91789308cd63bb (diff)
downloadpkgsrc-bead61245218e415239b116d6f56cd65d437fb82.tar.gz
When reporting packages detected by BSDpkg indicate them as 'BSDpkg' by
default, and 'pkgsrc' if appropriate
Diffstat (limited to 'net')
-rw-r--r--net/ocsinventory-agent/Makefile9
-rw-r--r--net/ocsinventory-agent/distinfo3
-rw-r--r--net/ocsinventory-agent/patches/patch-lib_Ocsinventory_Agent_Backend_OS_Generic_Packaging_BSDpkg.pm26
3 files changed, 33 insertions, 5 deletions
diff --git a/net/ocsinventory-agent/Makefile b/net/ocsinventory-agent/Makefile
index 7dae3e10de3..b02ed55db6e 100644
--- a/net/ocsinventory-agent/Makefile
+++ b/net/ocsinventory-agent/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.3 2010/12/01 21:00:51 bouyer Exp $
+# $NetBSD: Makefile,v 1.4 2011/05/22 22:41:09 abs Exp $
#
VERS= 1.1.2.1
+PKGREVISION= 1
DISTNAME= Ocsinventory-Agent-${VERS}
PKGNAME= ocsinventory-agent-${VERS}
CATEGORIES= net
@@ -25,7 +26,7 @@ WRKSRC= ${WRKDIR}/Ocsinventory-Agent-${VERS}
BUILD_DEFS+= VARBASE
AUTO_MKDIRS=yes
-PKG_DESTDIR_SUPPORT= user-destdir
+PKG_DESTDIR_SUPPORT= user-destdir
.include "../../mk/bsd.prefs.mk"
@@ -50,10 +51,10 @@ SUBST_MESSAGE.sysconfdir= Fixing hardcoded install directory path.
SUBST_STAGE.path= post-patch
SUBST_FILES.path= lib/Ocsinventory/Agent/Common.pm
SUBST_SED.path= -e "s|/usr/local/bin|${PREFIX}/bin|g"
-SUBST_SED.path= -e "s|/usr/local/sbin|${PREFIX}/sbin|g"
+SUBST_SED.path+= -e "s|/usr/local/sbin|${PREFIX}/sbin|g"
SUBST_MESSAGE.path= Fixing hardcoded path.
-PERL5_PACKLIST= auto/Ocsinventory/Agent/.packlist
+PERL5_PACKLIST= auto/Ocsinventory/Agent/.packlist
pre-patch:
${MKDIR} ${WRKSRC}/lib/Ocsinventory/Agent/Backend/OS/BSD/Pcictl
diff --git a/net/ocsinventory-agent/distinfo b/net/ocsinventory-agent/distinfo
index c55443d0686..ad56f2ffb04 100644
--- a/net/ocsinventory-agent/distinfo
+++ b/net/ocsinventory-agent/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2010/12/01 21:00:51 bouyer Exp $
+$NetBSD: distinfo,v 1.3 2011/05/22 22:41:09 abs Exp $
SHA1 (Ocsinventory-Agent-1.1.2.1.tar.gz) = ff8395bd281ddfdb9c3f9106b51aa75ac542f169
RMD160 (Ocsinventory-Agent-1.1.2.1.tar.gz) = 8cd303df6f760d6ec4f64e79792544c4c8119227
@@ -19,3 +19,4 @@ SHA1 (patch-am) = 376f95a684729ce32ded34a1a62d8ef300e52529
SHA1 (patch-an) = 4b1e91e7f1719c84782f541cb3abc6e39f6b94e6
SHA1 (patch-ao) = 87c6edc945e90d990d3db28687113189a723852b
SHA1 (patch-ap) = 1ccc2218c48355039b6af9732063b430607a70e4
+SHA1 (patch-lib_Ocsinventory_Agent_Backend_OS_Generic_Packaging_BSDpkg.pm) = d7abd77c73cd4e90d83a7a1c2f2dcbd8b66ffdc6
diff --git a/net/ocsinventory-agent/patches/patch-lib_Ocsinventory_Agent_Backend_OS_Generic_Packaging_BSDpkg.pm b/net/ocsinventory-agent/patches/patch-lib_Ocsinventory_Agent_Backend_OS_Generic_Packaging_BSDpkg.pm
new file mode 100644
index 00000000000..bc03945a3ba
--- /dev/null
+++ b/net/ocsinventory-agent/patches/patch-lib_Ocsinventory_Agent_Backend_OS_Generic_Packaging_BSDpkg.pm
@@ -0,0 +1,26 @@
+$NetBSD: patch-lib_Ocsinventory_Agent_Backend_OS_Generic_Packaging_BSDpkg.pm,v 1.1 2011/05/22 22:41:09 abs Exp $
+
+--- lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/BSDpkg.pm.orig 2010-10-12 18:02:53.000000000 +0000
++++ lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/BSDpkg.pm
+@@ -6,6 +6,11 @@ sub run {
+ my $params = shift;
+ my $inventory = $params->{inventory};
+
++ my $from = 'BSDpkg';
++ if (can_run("pkg_admin") && `pkg_admin config-var PKG_REFCOUNT_DBDIR` =~ m{^/}) {
++ $from = 'pkgsrc';
++ }
++
+ foreach(`pkg_info`){
+ /^(\S+)-(\d+\S*)\s+(.*)/;
+ my $name = $1;
+@@ -15,7 +20,8 @@ sub run {
+ $inventory->addSoftware({
+ 'COMMENTS' => $comments,
+ 'NAME' => $name,
+- 'VERSION' => $version
++ 'VERSION' => $version,
++ 'FROM' => $from
+ });
+ }
+ }