aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgollucci <pgollucci@FreeBSD.org>2010-02-12 03:42:33 +0800
committerpgollucci <pgollucci@FreeBSD.org>2010-02-12 03:42:33 +0800
commitdf393f1be3f505370b111f3d6773ed2f007ee70f (patch)
tree03bb3a181a68c932154f757460b1cf809510f22f
parente57177d0c2705472394e658a1ee979e7878a29f5 (diff)
downloadfreebsd-ports-gnome-df393f1be3f505370b111f3d6773ed2f007ee70f.tar.gz
freebsd-ports-gnome-df393f1be3f505370b111f3d6773ed2f007ee70f.tar.zst
freebsd-ports-gnome-df393f1be3f505370b111f3d6773ed2f007ee70f.zip
1. remove /var/run/mrtg via pkg-deinstall instead of via plist
pkg-install is already listed in SUB_FILES, no need to invoke sed manually 2. Fix wrong choice strings for translation 3. Fix some words at russian translation PR: ports/143728, ports/143179 Submitted by: "Alexey V. Panfilov" <ports@subnets.ru> (maintainer)
-rw-r--r--net-mgmt/mrtg/Makefile33
-rw-r--r--net-mgmt/mrtg/files/patch-aa11
-rw-r--r--net-mgmt/mrtg/files/patch-ab32
-rw-r--r--net-mgmt/mrtg/files/pkg-deinstall.in2
-rw-r--r--net-mgmt/mrtg/files/pkg-install.in13
-rw-r--r--net-mgmt/mrtg/pkg-plist1
6 files changed, 58 insertions, 34 deletions
diff --git a/net-mgmt/mrtg/Makefile b/net-mgmt/mrtg/Makefile
index eb349c434579..7405ce3dd8fa 100644
--- a/net-mgmt/mrtg/Makefile
+++ b/net-mgmt/mrtg/Makefile
@@ -7,7 +7,7 @@
PORTNAME= mrtg
PORTVERSION= 2.16.2
-PORTREVISION= 4
+PORTREVISION= 5
PORTEPOCH= 1
CATEGORIES= net-mgmt ipv6
MASTER_SITES= http://oss.oetiker.ch/mrtg/pub/ \
@@ -24,22 +24,21 @@ RUN_DEPENDS= ${SITE_PERL}/SNMP_Session.pm:${PORTSDIR}/net-mgmt/p5-SNMP_Session
CONFIGURE_ARGS= --with-gd-lib=${LOCALBASE}/lib \
--with-gd-inc=${LOCALBASE}/include
+USERS= mrtg
+GROUPS= mrtg
+
USE_PERL5= YES
MAKE_ENV+= PERL=${PERL}
-MRTG_USER?= mrtg
-MRTG_GROUP?= mrtg
-MRTG_UID?= 279
-MRTG_GID?= 279
MRTG_RUNDIR?= /var/run/mrtg
USE_RC_SUBR= mrtg_daemon
-SUB_FILES= pkg-install pkg-message
+SUB_FILES= pkg-deinstall pkg-install pkg-message
SUB_LIST= PERL=${PERL} \
- MRTG_USER=${MRTG_USER} \
- MRTG_GROUP=${MRTG_GROUP} \
- MRTG_UID=${MRTG_UID} \
- MRTG_GID=${MRTG_GID} \
- MRTG_RUNDIR=${MRTG_RUNDIR}
+ MRTG_RUNDIR=${MRTG_RUNDIR} \
+ USERS=${USERS} \
+ GROUPS=${GROUPS}
+PKGINSTALL= ${WRKDIR}/pkg-install
+PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
GNU_CONFIGURE= YES
CONFIGURE_ENV= PERL=${PERL}
@@ -80,20 +79,12 @@ RUN_DEPENDS+= ${SITE_PERL}/Net/SNMP.pm:${PORTSDIR}/net-mgmt/p5-Net-SNMP
post-patch:
@${RM} ${WRKSRC}/lib/mrtg2/BER.pm ${WRKSRC}/lib/mrtg2/SNMP_*.pm
-pre-configure:
- @${SED} -e 's,%%MRTG_USER%%,${MRTG_USER},g;' \
- -e 's,%%MRTG_GROUP%%,${MRTG_GROUP},g;' \
- -e 's,%%MRTG_UID%%,${MRTG_UID},g;' \
- -e 's,%%MRTG_GID%%,${MRTG_GID},g;' \
- -e 's,%%MRTG_RUNDIR%%,${MRTG_RUNDIR},g;' \
- < ${FILESDIR}/pkg-install.in > ${PKGINSTALL}
- @${SETENV} @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} \
- PRE-INSTALL
-
do-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${DOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/
+.endif
+.if !defined(NOPORTEXAMPLES)
@${MKDIR} ${EXAMPLESDIR}/doc ${EXAMPLESDIR}/images
@${INSTALL_DATA} ${EXAMPLES:S,^,${WRKSRC}/doc/,} ${EXAMPLESDIR}/doc/
@${INSTALL_DATA} ${IMAGES:S,^,${WRKSRC}/images/,} ${EXAMPLESDIR}/images/
diff --git a/net-mgmt/mrtg/files/patch-aa b/net-mgmt/mrtg/files/patch-aa
new file mode 100644
index 000000000000..581476122404
--- /dev/null
+++ b/net-mgmt/mrtg/files/patch-aa
@@ -0,0 +1,11 @@
+--- bin/mrtg.orig 2010-01-15 17:02:33.000000000 +0300
++++ bin/mrtg 2010-01-15 16:38:33.000000000 +0300
+@@ -1608,7 +1608,7 @@
+ print HTML "
+ <!-- Begin $sample{$peri} -->
+ <div class=\"graph\">
+- <h2>".&$LOC("$sample{$peri}")." ".&$LOC("Average)")."</h2>
++ <h2>".&$LOC("$sample{$peri}").&$LOC(" Average\)")."</h2>
+ <img src=\"$imagepath$router-$full{$peri}.${main::GRAPHFMT}\" title=\"$full{$peri}\" alt=\"$full{$peri}\" />
+ <table>
+ <tr>
diff --git a/net-mgmt/mrtg/files/patch-ab b/net-mgmt/mrtg/files/patch-ab
new file mode 100644
index 000000000000..6c30b77e476b
--- /dev/null
+++ b/net-mgmt/mrtg/files/patch-ab
@@ -0,0 +1,32 @@
+--- lib/mrtg2/locales_mrtg.pm.orig 2008-05-16 18:45:41.000000000 +0400
++++ lib/mrtg2/locales_mrtg.pm 2010-01-15 16:33:33.000000000 +0300
+@@ -4137,10 +4137,10 @@
+ 'Max' => 'нБЛУ.',
+ 'Current' => 'фЕЛХЭЙК',
+ 'version' => 'ЧЕТУЙС',
+- '`Daily\' Graph \((.*) Minute' => 'уХФПЮОЩК ФТБЖЙЛ (УТЕДОЕЕ ЪБ $1 НЙОХФ',
+- '`Weekly\' Graph \(30 Minute' => 'оЕДЕМШОЩК ФТБЖЙЛ (УТЕДОЕЕ ЪБ 30 НЙОХФ' ,
+- '`Monthly\' Graph \(2 Hour' => 'нЕУСЮОЩК ФТБЖЙЛ (УТЕДОЕЕ ЪБ 2 ЮБУБ',
+- '`Yearly\' Graph \(1 Day' => 'зПДПЧПК ФТБЖЙЛ (УТЕДОЕЕ ЪБ 1 ДЕОШ',
++ '`Daily\' Graph \((.*) Minute' => 'уХФПЮОЩК ЗТБЖЙЛ (УТЕДОЕЕ ЪБ $1 НЙОХФ',
++ '`Weekly\' Graph \(30 Minute' => 'оЕДЕМШОЩК ЗТБЖЙЛ (УТЕДОЕЕ ЪБ 30 НЙОХФ' ,
++ '`Monthly\' Graph \(2 Hour' => 'нЕУСЮОЩК ЗТБЖЙЛ (УТЕДОЕЕ ЪБ 2 ЮБУБ',
++ '`Yearly\' Graph \(1 Day' => 'зПДПЧПК ЗТБЖЙЛ (УТЕДОЕЕ ЪБ 1 ДЕОШ',
+ 'Incoming Traffic in (\S+) per Second' => 'чИПДСЭЙК ФТБЖЙЛ Ч $1 Ч УЕЛХОДХ',
+ 'Outgoing Traffic in (\S+) per Second' => 'йУИПДСЭЙК ФТБЖЙЛ Ч $1 Ч УЕЛХОДХ',
+ 'at which time (.*) had been up for(.*)' => 'Ч ЬФП ЧТЕНС $1 ВЩМБ ЧЛМАЮЕОБ $2',
+@@ -4245,10 +4245,10 @@
+ 'Max' => 'Максимально',
+ 'Current' => 'Сейчас',
+ 'version' => 'версия',
+- '`Daily\' Graph \((.*) Minute' => 'Суточный трафик (среднее за $1 минут',
+- '`Weekly\' Graph \(30 Minute' => 'Недельный трафик (среднее за 30 минут' ,
+- '`Monthly\' Graph \(2 Hour' => 'Месячный трафик (среднее за 2 часа',
+- '`Yearly\' Graph \(1 Day' => 'Годовой трафик (среднее за 1 день',
++ '`Daily\' Graph \((.*) Minute' => 'Суточный график (среднее за $1 минут',
++ '`Weekly\' Graph \(30 Minute' => 'Недельный график (среднее за 30 минут' ,
++ '`Monthly\' Graph \(2 Hour' => 'Месячный график (среднее за 2 часа',
++ '`Yearly\' Graph \(1 Day' => 'Годовой график (среднее за 1 день',
+ 'Incoming Traffic in (\S+) per Second' => 'Входящий трафик в $1 в секунду',
+ 'Outgoing Traffic in (\S+) per Second' => 'Исходящий трафик в $1 в секунду',
+ 'at which time <strong>(\S+)</strong> had been up for <strong>(\S+)</strong>' => 'время после инициализации устройства <strong>$1</strong>: <strong>$2</strong>.',
diff --git a/net-mgmt/mrtg/files/pkg-deinstall.in b/net-mgmt/mrtg/files/pkg-deinstall.in
new file mode 100644
index 000000000000..ebfc2dc44382
--- /dev/null
+++ b/net-mgmt/mrtg/files/pkg-deinstall.in
@@ -0,0 +1,2 @@
+#!/bin/sh
+rm -rf %%MRTG_RUNDIR%%
diff --git a/net-mgmt/mrtg/files/pkg-install.in b/net-mgmt/mrtg/files/pkg-install.in
index 3fd67ec9d604..72ff6e8c7159 100644
--- a/net-mgmt/mrtg/files/pkg-install.in
+++ b/net-mgmt/mrtg/files/pkg-install.in
@@ -8,27 +8,16 @@ CHMOD="/bin/chmod"
MKDIR="/bin/mkdir -p"
NOLOGIN="/usr/sbin/nologin"
-MRTG_USER=%%MRTG_USER%%
-MRTG_GROUP=%%MRTG_GROUP%%
-MRTG_UID=%%MRTG_UID%%
-MRTG_GID=%%MRTG_GID%%
MRTG_RUNDIR=%%MRTG_RUNDIR%%
case "$2" in
-
-PRE-INSTALL)
- ${PW} groupshow -n ${MRTG_GROUP} >/dev/null 2>&1 \
- || ${PW} groupadd -n ${MRTG_GROUP} -g ${MRTG_GID}
- ${PW} usershow -n ${MRTG_USER} >/dev/null 2>&1 \
- || ${PW} useradd ${MRTG_USER} -g ${MRTG_GROUP} -u ${MRTG_UID} -s ${NOLOGIN}
- ;;
POST-INSTALL)
if [ ! -d "$MRTG_RUNDIR" ]; then
${MKDIR} $MRTG_RUNDIR
fi
- ${CHOWN} -R ${MRTG_USER}:${MRTG_USER} ${MRTG_RUNDIR}
+ ${CHOWN} -R %%USERS%%:%%GROUPS%% ${MRTG_RUNDIR}
${CHMOD} 0700 ${MRTG_RUNDIR}
;;
esac
diff --git a/net-mgmt/mrtg/pkg-plist b/net-mgmt/mrtg/pkg-plist
index 0eab9473824f..4985eaba4bbe 100644
--- a/net-mgmt/mrtg/pkg-plist
+++ b/net-mgmt/mrtg/pkg-plist
@@ -61,7 +61,6 @@ bin/rateup
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/images/mrtg-r.png
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/images/mrtg-ti.gif
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/images/mrtg-ti.png
-@dirrmtry /var/run/mrtg
@dirrmtry %%ETCDIR%%
%%PORTDOCS%%@dirrm %%DOCSDIR%%
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/images