aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2014-05-12 00:47:58 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2014-05-12 00:47:58 +0800
commited7e2b9a3cb6c637f45d18def2c08126c14cca12 (patch)
treedb974d5eb0768ae54ef8a34b5f747061b6ab01c6 /sysutils
parent9fb29d17d9acfc78b315934ca96b9ee94e55db52 (diff)
downloadfreebsd-ports-gnome-ed7e2b9a3cb6c637f45d18def2c08126c14cca12.tar.gz
freebsd-ports-gnome-ed7e2b9a3cb6c637f45d18def2c08126c14cca12.tar.zst
freebsd-ports-gnome-ed7e2b9a3cb6c637f45d18def2c08126c14cca12.zip
- Support staging
- Use new LIB_DEPENDS syntax - Convert USE_GMAKE to USES - Add missing bash dependency
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/pacman/Makefile34
-rw-r--r--sysutils/pacman/pkg-deinstall20
-rw-r--r--sysutils/pacman/pkg-install10
-rw-r--r--sysutils/pacman/pkg-plist16
4 files changed, 49 insertions, 31 deletions
diff --git a/sysutils/pacman/Makefile b/sysutils/pacman/Makefile
index 64a3ce53b5f2..77788605437b 100644
--- a/sysutils/pacman/Makefile
+++ b/sysutils/pacman/Makefile
@@ -3,7 +3,7 @@
PORTNAME= pacman
PORTVERSION= 4.0.3
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.archlinux.org/other/pacman/ \
http://mirror.amdmi3.ru/distfiles/
@@ -15,10 +15,12 @@ LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= asciidoc:${PORTSDIR}/textproc/asciidoc \
- gm4:${PORTSDIR}/devel/m4
+ gm4:${PORTSDIR}/devel/m4 \
+ bash:${PORTSDIR}/shells/bash
+RUN_DEPENDS= bash:${PORTSDIR}/shells/bash
+USES= gmake libtool
GNU_CONFIGURE= yes
-USE_GMAKE= yes
CONFIGURE_ARGS= --with-root-dir="${PACMAN_ROOT}" \
--localstatedir=/var
USE_LDCONFIG= yes
@@ -34,29 +36,23 @@ PACMAN_ROOT?= "${PREFIX}/pacman"
PORTEXAMPLES= *
-MAN3= libalpm.3
-MAN5= PKGBUILD.5 makepkg.conf.5 pacman.conf.5
-MAN8= makepkg.8 pacman-key.8 pacman.8 pkgdelta.8 repo-add.8 vercmp.8
-MLINKS= repo-add.8 repo-remove.8
-
OPTIONS_DEFINE= CURL GPGME EXAMPLES NLS
OPTIONS_DEFAULT=CURL GPGME
CURL_DESC= Use libcurl fetcher instead of external curl/wget
GPGME_DESC= Use GPGME for PGP signature verification
-NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MCURL}
CONFIGURE_ARGS+=--with-libcurl=${LOCALBASE}
-LIB_DEPENDS+= curl:${PORTSDIR}/ftp/curl
+LIB_DEPENDS+= libcurl.so:${PORTSDIR}/ftp/curl
.else
CONFIGURE_ARGS+=--without-libcurl
.endif
.if ${PORT_OPTIONS:MGPGME}
CONFIGURE_ARGS+=--with-gpgme
-LIB_DEPENDS+= gpgme:${PORTSDIR}/security/gpgme
+LIB_DEPENDS+= libgpgme.so:${PORTSDIR}/security/gpgme
CFLAGS+= -I${LOCALBASE}/include/gpgme
.endif
@@ -83,17 +79,13 @@ post-patch:
.endif
post-install:
+ @${RM} -rf ${STAGEDIR}/var # handled by pkg-install
.for f in makepkg.conf pacman.conf
- ${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f}.dist
- if [ ! -f ${PREFIX}/etc/${f} ]; then \
- ${INSTALL_DATA} ${PREFIX}/etc/${f}.dist ${PREFIX}/etc/${f}; \
- fi
+ ${INSTALL_DATA} ${WRKSRC}/etc/${f} ${STAGEDIR}${PREFIX}/etc/${f}.dist
.endfor
-.if ${PORT_OPTIONS:MEXAMPLES}
- ${MKDIR} ${EXAMPLESDIR}
- ${INSTALL_DATA} ${WRKSRC}/doc/PKGBUILD-example.txt ${EXAMPLESDIR}/
-.endif
- ${MKDIR} ${PACMAN_ROOT}
- ${CAT} ${PKGMESSAGE}
+ ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/PKGBUILD-example.txt ${STAGEDIR}${EXAMPLESDIR}/
+ ${MKDIR} ${STAGEDIR}${PACMAN_ROOT}
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libalpm.so
.include <bsd.port.mk>
diff --git a/sysutils/pacman/pkg-deinstall b/sysutils/pacman/pkg-deinstall
index d63c68edb5c9..bff986c1481e 100644
--- a/sysutils/pacman/pkg-deinstall
+++ b/sysutils/pacman/pkg-deinstall
@@ -4,12 +4,18 @@
#
case $2 in
-DEINSTALL)
- echo ""
- echo "To completely remove the port, please remove the following"
- echo "directories and the content manualy:"
- echo ""
- echo "/var/lib/pacman prefix/var/cache/pacman"
- echo ""
+POST-DEINSTALL)
+ rmdir /var/cache/pacman/pkg 2>/dev/null || true
+ rmdir /var/cache/pacman 2>/dev/null || true
+ rmdir /var/lib/pacman 2>/dev/null || true
+ rmdir /var/lib 2>/dev/null || true
+ if [ -e /var/lib/pacman -o -e /var/cache/pacman ]; then
+ echo ""
+ echo "To completely remove the port, please remove the following"
+ echo "directories and the content manualy:"
+ echo ""
+ echo " /var/lib/pacman /var/cache/pacman"
+ echo ""
+ fi
;;
esac
diff --git a/sysutils/pacman/pkg-install b/sysutils/pacman/pkg-install
new file mode 100644
index 000000000000..36a5900a4f4c
--- /dev/null
+++ b/sysutils/pacman/pkg-install
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+case $2 in
+POST-INSTALL)
+ mkdir -p /var/lib/pacman /var/cache/pacman/pkg
+ ;;
+esac
diff --git a/sysutils/pacman/pkg-plist b/sysutils/pacman/pkg-plist
index 7ac9102bc76f..1ba0044fb86f 100644
--- a/sysutils/pacman/pkg-plist
+++ b/sysutils/pacman/pkg-plist
@@ -23,9 +23,20 @@ etc/pacman.conf.dist
include/alpm.h
include/alpm_list.h
lib/libalpm.a
-lib/libalpm.la
lib/libalpm.so
lib/libalpm.so.7
+lib/libalpm.so.7.0.3
+man/man3/libalpm.3.gz
+man/man5/PKGBUILD.5.gz
+man/man5/makepkg.conf.5.gz
+man/man5/pacman.conf.5.gz
+man/man8/makepkg.8.gz
+man/man8/pacman-key.8.gz
+man/man8/pacman.8.gz
+man/man8/pkgdelta.8.gz
+man/man8/repo-add.8.gz
+man/man8/repo-remove.8.gz
+man/man8/vercmp.8.gz
%%NLS%%share/locale/ca/LC_MESSAGES/libalpm.mo
%%NLS%%share/locale/ca/LC_MESSAGES/pacman-scripts.mo
%%NLS%%share/locale/ca/LC_MESSAGES/pacman.mo
@@ -116,5 +127,4 @@ lib/libalpm.so.7
%%DATADIR%%/PKGBUILD.proto
%%DATADIR%%/proto.install
@dirrm %%DATADIR%%
-@exec mkdir -p %%PACMAN_ROOT%%
-@unexec rmdir %%PACMAN_ROOT%% 2>/dev/null || true
+@dirrmtry %%PACMAN_ROOT%%