diff options
author | jhale <jhale@FreeBSD.org> | 2017-01-11 09:13:51 +0800 |
---|---|---|
committer | jhale <jhale@FreeBSD.org> | 2017-01-11 09:13:51 +0800 |
commit | 3a9aa677e69f4e9949b06712d00894d56f466441 (patch) | |
tree | 06162bdf5c4a70b12daa262c97342a7bc181371e /finance | |
parent | a112616e45676b3fd960b451105563c138116abb (diff) | |
download | freebsd-ports-gnome-3a9aa677e69f4e9949b06712d00894d56f466441.tar.gz freebsd-ports-gnome-3a9aa677e69f4e9949b06712d00894d56f466441.tar.zst freebsd-ports-gnome-3a9aa677e69f4e9949b06712d00894d56f466441.zip |
- Fix LICENSE
- Install DOCS
- Add TEST_TARGET to run checks
- Make the bankdata update script use fetch(1) instead of wget and
retrieve the bankdata via https
- Notify users that the included bankdata is outdated and it needs
to be updated manually
Diffstat (limited to 'finance')
-rw-r--r-- | finance/ktoblzcheck/Makefile | 16 | ||||
-rw-r--r-- | finance/ktoblzcheck/files/patch-src_bankdata_online__update.pl.in | 43 | ||||
-rw-r--r-- | finance/ktoblzcheck/files/pkg-deinstall.in | 14 | ||||
-rw-r--r-- | finance/ktoblzcheck/files/pkg-message.in | 13 |
4 files changed, 83 insertions, 3 deletions
diff --git a/finance/ktoblzcheck/Makefile b/finance/ktoblzcheck/Makefile index 7e7ab71788e5..9b847502b8d9 100644 --- a/finance/ktoblzcheck/Makefile +++ b/finance/ktoblzcheck/Makefile @@ -3,28 +3,38 @@ PORTNAME= ktoblzcheck PORTVERSION= 1.48 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= finance german MASTER_SITES= SF/${PORTNAME} MAINTAINER= jhale@FreeBSD.org COMMENT= Check bank codes of German banks -LICENSE= LGPL21 +LICENSE= LGPL21+ LICENSE_FILE= ${WRKSRC}/COPYING USES= libtool pathfix perl5 GNU_CONFIGURE= yes USE_LDCONFIG= yes +CONFIGURE_ARGS= --with-wget=${FETCH_BINARY} INSTALL_TARGET= install-strip -OPTIONS_DEFINE= PYTHON +SUB_FILES= pkg-deinstall pkg-message +PORTDOCS= README + +OPTIONS_DEFINE= DOCS PYTHON OPTIONS_SUB= yes PYTHON_USES= python:2 PYTHON_CONFIGURE_ENABLE= python +TEST_TARGET= check + post-patch: @${REINPLACE_CMD} -e "s/-lstdc++//g" ${WRKSRC}/src/lib/Makefile.in +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} + .include <bsd.port.mk> diff --git a/finance/ktoblzcheck/files/patch-src_bankdata_online__update.pl.in b/finance/ktoblzcheck/files/patch-src_bankdata_online__update.pl.in new file mode 100644 index 000000000000..0f9d11098483 --- /dev/null +++ b/finance/ktoblzcheck/files/patch-src_bankdata_online__update.pl.in @@ -0,0 +1,43 @@ +- Use fetch(1) instead of requiring wget or lynx +- Download over a secure connection + +--- src/bankdata/online_update.pl.in.orig 2012-10-01 21:03:49 UTC ++++ src/bankdata/online_update.pl.in +@@ -21,8 +21,8 @@ $pkgdatadir="$datadir/@PACKAGE@"; + $BANKDATADIR="@BANKDATA_PATH@"; + + ## Sanity checks +-die "Neither wget nor lynx is available on your system, or was available on the system where the installed rpm was built. This tool requires wget or lynx. If you have it i +-nstalled, then edit the script and set the variable WGET or LYNX to the full path to wget or lynx. Aborting for now." ++die "Neither fetch nor lynx is available on your system, or was available on the system where the installed package was built. This tool requires fetch or lynx. If you have it i ++nstalled, then edit the script and set the variable WGET or LYNX to the full path to fetch or lynx. Aborting for now." + if $WGET eq "NO" and $LYNX eq "NO"; + #die "sed or grep is not available on your system. This tool requires it. Aborting." + # if $SED eq "NO" || $GREP eq "NO"; +@@ -35,13 +35,13 @@ die "The directory for the bankdata \"$B + + ## Common constants + $debug=0; # set this to nonzero for activating debugging mode +-$BASE_URL="http://www.bundesbank.de"; ++$BASE_URL="https://www.bundesbank.de"; + $MAIN_URL="$BASE_URL"; + $MAIN_DOC="$MAIN_URL/Redaktion/DE/Standardartikel/Kerngeschaeftsfelder/Unbarer_Zahlungsverkehr/bankleitzahlen_download.html"; + + if ($debug == 0) { + if ($WGET ne "NO") { +- $DOWNLOADCMD = "$WGET -O - $MAIN_DOC"; ++ $DOWNLOADCMD = "$WGET -q -o - $MAIN_DOC"; + } else { + $DOWNLOADCMD = "$LYNX -source $MAIN_DOC"; + } +@@ -145,8 +145,8 @@ if ($debug == 0) { + ## + ## 1. Download + if ($WGET ne "NO") { +- print "$ECHO $WGET -O $install_1 $download\n"; +- system("$ECHO $WGET -O $install_1 $download"); ++ print "$ECHO $WGET -q -o $install_1 $download\n"; ++ system("$ECHO $WGET -q -o $install_1 $download"); + } else { + print "$ECHO $LYNX -source $download $gt $install_1\n"; + system("$ECHO $LYNX -source $download $gt $install_1");# || die "can't call system: $!"; diff --git a/finance/ktoblzcheck/files/pkg-deinstall.in b/finance/ktoblzcheck/files/pkg-deinstall.in new file mode 100644 index 000000000000..f1bf52cd1186 --- /dev/null +++ b/finance/ktoblzcheck/files/pkg-deinstall.in @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ "${2}" = "POST-DEINSTALL" ]; then + if [ -d %%DATADIR%% ]; then + echo "" + echo "--------------------------------------------------------------------" + echo "To completely remove the port, you may need to remove" + echo "the following directories and the content manually:" + echo "" + echo " %%DATADIR%%" + echo "--------------------------------------------------------------------" + echo "" + fi +fi diff --git a/finance/ktoblzcheck/files/pkg-message.in b/finance/ktoblzcheck/files/pkg-message.in new file mode 100644 index 000000000000..5bc44881a2b4 --- /dev/null +++ b/finance/ktoblzcheck/files/pkg-message.in @@ -0,0 +1,13 @@ +-------------------------------------------------------------------- +The bankdata included with the ktoblzcheck distribution is outdated. +You should update this bankdata upon installation and periodically +afterwards. New bankdata is typically available every three months. + +To update the bankdata, run (as root): + +# %%DATADIR%%/online_update.pl + +The script is interactive and will present you with the bankdata +available for download. Follow the prompts and it will write the +new bankdata to %%DATADIR%%. +-------------------------------------------------------------------- |