aboutsummaryrefslogtreecommitdiffstats
path: root/x11/xloadimage
diff options
context:
space:
mode:
Diffstat (limited to 'x11/xloadimage')
-rw-r--r--x11/xloadimage/Makefile27
-rw-r--r--x11/xloadimage/pkg-deinstall53
-rw-r--r--x11/xloadimage/pkg-install67
-rw-r--r--x11/xloadimage/pkg-plist6
4 files changed, 17 insertions, 136 deletions
diff --git a/x11/xloadimage/Makefile b/x11/xloadimage/Makefile
index 24478cd45ae5..5cffeb72ba92 100644
--- a/x11/xloadimage/Makefile
+++ b/x11/xloadimage/Makefile
@@ -19,6 +19,8 @@ PATCH_DIST_STRIP= -p1
MAINTAINER= ports@FreeBSD.org
COMMENT= X11 Image Loading Utility
+LICENCE= MIT
+
LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg \
png.6:${PORTSDIR}/graphics/png \
tiff.4:${PORTSDIR}/graphics/tiff
@@ -32,9 +34,10 @@ PATCHREV= .2
USE_XORG= x11
GNU_CONFIGURE= yes
+MAKE_JOBS_SAFE= yes
-LDFLAGS+= -L${LOCALBASE}/lib
CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
MAN1= xloadimage.1 uufilter.1
MLINKS= xloadimage.1 xsetbg.1 \
@@ -46,10 +49,10 @@ post-patch:
${WRKSRC}/png.c
@${REINPLACE_CMD} -e 's|TIFFHeader|TIFFHeaderClassic|g' \
${WRKSRC}/tiff.c
- @cd ${WRKSRC}; ${MV} xloadimage.man xloadimage.man.old; \
- ${SED} -e s:/etc/X11/Xloadimage:${PREFIX}/etc/xloadimagerc: \
- -e s:/usr/lib/xloadimagerc:${PREFIX}/etc/xloadimagerc: \
- < xloadimage.man.old > xloadimage.man
+ @${REINPLACE_CMD} -e \
+ 's:/etc/X11/Xloadimage:${PREFIX}/etc/xloadimagerc: ; \
+ s:/usr/lib/xloadimagerc:${PREFIX}/etc/xloadimagerc:' \
+ ${WRKSRC}/xloadimage.man
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/xloadimage ${PREFIX}/bin
@@ -57,13 +60,11 @@ do-install:
${LN} -sf xloadimage xsetbg && \
${LN} -sf xloadimage xview
${INSTALL_PROGRAM} ${WRKSRC}/uufilter ${PREFIX}/bin
- ${INSTALL_MAN} ${WRKSRC}/xloadimage.man ${PREFIX}/man/man1/xloadimage.1
- ${INSTALL_MAN} ${WRKSRC}/uufilter.man ${PREFIX}/man/man1/uufilter.1
- ${MKDIR} ${PREFIX}/share/examples/xloadimage
- ${INSTALL_DATA} ${WRKSRC}/xloadimagerc \
- ${PREFIX}/share/examples/xloadimage/xloadimagerc
-
-post-install:
- @PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ ${INSTALL_MAN} ${WRKSRC}/xloadimage.man ${MANPREFIX}/man/man1/xloadimage.1
+ ${INSTALL_MAN} ${WRKSRC}/uufilter.man ${MANPREFIX}/man/man1/uufilter.1
+ ${INSTALL_DATA} ${WRKSRC}/xloadimagerc ${PREFIX}/etc/xloadimagerc.sample
+.if !exists(${PREFIX}/etc/xloadimagerc)
+ @cd ${PREFIX}/etc && ${CP} -f xloadimagerc.sample xloadimagerc
+.endif
.include <bsd.port.mk>
diff --git a/x11/xloadimage/pkg-deinstall b/x11/xloadimage/pkg-deinstall
deleted file mode 100644
index 021c1b864dd0..000000000000
--- a/x11/xloadimage/pkg-deinstall
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-#
-# De-installation setup of xloadimage
-
-# exit on errors, use a sane path and install prefix
-#
-set -e
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-PREFIX=${PKG_PREFIX:-/usr/local}
-CONFIG_FILE=${PREFIX}/etc/xloadimagerc
-
-# Function: tell the user what they need to do to delete the port completely
-#
-do_notice()
-{
- echo
- echo "+---------------"
- echo "| To completely deinstall the $1 package you need to perform"
- echo "| these steps as root:"
- echo "|"
- echo "| rm -f ${CONFIG_FILE}"
- echo "|"
- echo "| Do not do this if you plan on re-installing $1"
- echo "| at some future time."
- echo "+---------------"
- echo
-}
-
-# Verify proper execution
-#
-if [ $# -ne 2 ]; then
- echo "usage: $0 distname { DEINSTALL | POST-DEINSTALL }" >&2
- exit 1
-fi
-
-# Verify/process the command
-#
-case $2 in
- DEINSTALL)
- if [ -f ${CONFIG_FILE} ]; then
- do_notice "$1"
- fi
- ;;
- POST-DEINSTALL)
-: nothing to post-deinstall for this port
- ;;
- *)
- echo "usage: $0 distname { DEINSTALL | POST-DEINSTALL }" >&2
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/x11/xloadimage/pkg-install b/x11/xloadimage/pkg-install
deleted file mode 100644
index 8f59a7a7528c..000000000000
--- a/x11/xloadimage/pkg-install
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-#
-# Pre/post-installation setup of xloadimage
-
-# exit on errors, use a sane path and install prefix
-#
-set -e
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-PREFIX=${PREFIX:-${PKG_PREFIX:-/usr/local}}
-CONFIG_FILE=${PREFIX}/etc/xloadimagerc
-SAMPLE_CONFIG_DIR=${PREFIX}/share/examples/xloadimage
-
-# Function: tell the user what they need to do to use the port just installed
-#
-do_notice()
-{
- echo
- echo "+---------------"
- echo "| The existing $1 configuration file, ${CONFIG_FILE},"
- echo "| has NOT been changed. You may want to compare it to the"
- echo "| current sample files in ${SAMPLE_CONFIG_DIR}"
- echo "| and update your configuration as needed."
- echo "+---------------"
- echo
-}
-
-# Function: install configuration files
-#
-do_install()
-{
- install -c -o root -g wheel ${SAMPLE_CONFIG_DIR}/xloadimagerc ${CONFIG_FILE}
- echo
- echo "+---------------"
- echo "| The $1 configuration file, ${CONFIG_FILE},"
- echo "| has been installed. Please view this file and change"
- echo "| the configuration to meet your needs"
- echo "+---------------"
- echo
-}
-
-# Verify proper execution
-#
-if [ $# -ne 2 ]; then
- echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
- exit 1
-fi
-
-# Verify/process the command
-#
-case $2 in
- PRE-INSTALL)
- : nothing to pre-install for this port
- ;;
- POST-INSTALL)
- if [ -f ${CONFIG_FILE} ]; then
- do_notice "$1"
- else
- do_install "$1"
- fi
- ;;
- *)
- echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/x11/xloadimage/pkg-plist b/x11/xloadimage/pkg-plist
index 0a051814d59c..b6d719229126 100644
--- a/x11/xloadimage/pkg-plist
+++ b/x11/xloadimage/pkg-plist
@@ -2,6 +2,6 @@ bin/uufilter
bin/xloadimage
bin/xsetbg
bin/xview
-etc/xloadimagerc
-%%EXAMPLESDIR%%/xloadimagerc
-@dirrm %%EXAMPLESDIR%%
+@unexec if cmp -s %D/etc/xloadimagerc.sample %D/etc/xloadimagerc; then rm -f %D/etc/xloadimagerc; fi
+etc/xloadimagerc.sample
+@exec if [ ! -f %D/etc/xloadimagerc ] ; then cp -p %D/%F %B/xloadimagerc; fi