aboutsummaryrefslogtreecommitdiffstats
path: root/russian
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2005-11-04 13:45:15 +0800
committeredwin <edwin@FreeBSD.org>2005-11-04 13:45:15 +0800
commit916548dc17168423e7b8fa85c1e463dbfc98f1dd (patch)
treeca254c3ad1003f3f4d5ca07cd6b3ceffd1f0609a /russian
parentd483d17aa2b14e5bd8728ba61e7487a3c2e2ca8d (diff)
downloadfreebsd-ports-gnome-916548dc17168423e7b8fa85c1e463dbfc98f1dd.tar.gz
freebsd-ports-gnome-916548dc17168423e7b8fa85c1e463dbfc98f1dd.tar.zst
freebsd-ports-gnome-916548dc17168423e7b8fa85c1e463dbfc98f1dd.zip
Unbreak port by fixing pkg-plist and adding pkg-install and
pkg-deinstall scripts. Note to future PR submitters: If your port changes anything from other ports, make sure it's changed back when it gets deinstalled!
Diffstat (limited to 'russian')
-rw-r--r--russian/pgp.language/Makefile25
-rw-r--r--russian/pgp.language/files/pkg-deinstall.in18
-rw-r--r--russian/pgp.language/files/pkg-install.in18
-rw-r--r--russian/pgp.language/pkg-plist4
4 files changed, 52 insertions, 13 deletions
diff --git a/russian/pgp.language/Makefile b/russian/pgp.language/Makefile
index c5dc0c8a91b8..3eb2e510c6d8 100644
--- a/russian/pgp.language/Makefile
+++ b/russian/pgp.language/Makefile
@@ -7,7 +7,7 @@
PORTNAME= pgp
PORTVERSION= 2.6.3ia
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= russian
MASTER_SITES= ftp://ftp.kiarchive.ru/pub/unix/crypto/pgp/
DISTNAME= pgp26ru
@@ -17,24 +17,27 @@ COMMENT= Russian language module for PGP
RUN_DEPENDS= ${LOCALBASE}/share/pgp/config.txt:${PORTSDIR}/security/pgp
-BROKEN= Incorrect pkg-plist
-DEPRECATED= ${BROKEN}
-EXPIRATION_DATE=2005-09-22
-
USE_ZIP= YES
NO_WRKSUBDIR= YES
NO_BUILD= YES
+SUB_FILES= pkg-install pkg-deinstall
+PKGINSTALL= ${WRKDIR}/pkg-install
+PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
+
PGPLIB= ${PREFIX}/share/pgp
OBJS= language.txt ru.hlp
do-install:
[ -d ${PGPLIB} ] || ${MKDIR} ${PGPLIB}
- cd ${WRKSRC}; install -c -o bin -g bin -m 444 ${OBJS} ${PGPLIB}
- cd ${WRKSRC}; ${TR} -d '\015' < NOTES.ru > ${PGPLIB}/NOTES.ru
- cd ${PGPLIB}; ${GREP} -l -q '^Language.*=.*ru' config.txt || { \
- ${CP} config.txt config.txt.bak; \
- ${SED} 's/^Language.*=.*$$/Language = ru/' < config.txt.bak > config.txt; }
- -pgp > /dev/null 2>&1 # update .idx file
+ cd ${WRKSRC}; \
+ if [ ! -f ${PGPLIB}/language.txt-ru ]; then \
+ ${CP} ${PGPLIB}/language.txt ${PGPLIB}/language.txt-ru; \
+ fi; \
+ ${INSTALL_DATA} ${OBJS} ${PGPLIB}; \
+ ${TR} -d '\015' < NOTES.ru > ${PGPLIB}/NOTES.ru
+
+post-install:
+ @${SETENV} ${SCRIPTS_ENV} PGPLIB="${PGPLIB}" PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} pkg-install
.include <bsd.port.mk>
diff --git a/russian/pgp.language/files/pkg-deinstall.in b/russian/pgp.language/files/pkg-deinstall.in
new file mode 100644
index 000000000000..9f28c652b44b
--- /dev/null
+++ b/russian/pgp.language/files/pkg-deinstall.in
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+cd %%PREFIX%%/share/pgp
+
+if grep -l -q '^Language.*=.*ru' config.txt ; then
+ cp config.txt config.txt.bak
+ sed -e 's/^Language = ru$/Language = en/' < config.txt.bak > config.txt
+ rm config.txt.bak
+fi
+
+if [ -f language.txt-ru ]; then
+ cp language.txt-ru language.txt
+fi
+
+%%LOCALBASE%%/bin/pgp > /dev/null 2>/dev/null
+exit 0
diff --git a/russian/pgp.language/files/pkg-install.in b/russian/pgp.language/files/pkg-install.in
new file mode 100644
index 000000000000..ac6e69a69f01
--- /dev/null
+++ b/russian/pgp.language/files/pkg-install.in
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+cd %%PREFIX%%/share/pgp
+
+if [ ! -f language.txt-ru ]; then
+ cp language.txt language.txt-ru
+fi
+
+if ! grep -l -q '^Language.*=.*ru' config.txt ; then
+ cp config.txt config.txt.bak
+ sed -e 's/^Language.*=.*$/Language = ru/' < config.txt.bak > config.txt
+ rm config.txt.bak
+fi
+
+%%LOCALBASE%%/bin/pgp
+exit 0
diff --git a/russian/pgp.language/pkg-plist b/russian/pgp.language/pkg-plist
index 4cec77b4e4ac..711071dcde0b 100644
--- a/russian/pgp.language/pkg-plist
+++ b/russian/pgp.language/pkg-plist
@@ -1,4 +1,4 @@
-share/pgp/language.txt
share/pgp/ru.hlp
share/pgp/NOTES.ru
-share/pgp/config.txt
+share/pgp/language.idx
+share/pgp/language.txt-ru