From 6af9ea4c740d28fbda65d4dd4192dbeceeccb46c Mon Sep 17 00:00:00 2001 From: rafan Date: Fri, 17 Aug 2007 17:34:55 +0000 Subject: - Fix plist after PORTNAME is changed PR: ports/115274 Submitted by: Thomas Hurst Approved by: Daniel (maintainer) --- news/sabnzbd/Makefile | 5 +++++ news/sabnzbd/files/patch-setup.py | 8 ++++---- news/sabnzbd/files/pkg-message.in | 4 ++-- news/sabnzbdplus/Makefile | 5 +++++ news/sabnzbdplus/files/patch-setup.py | 8 ++++---- news/sabnzbdplus/files/pkg-message.in | 4 ++-- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/news/sabnzbd/Makefile b/news/sabnzbd/Makefile index d14ff089f9d..325ca2ec7b5 100644 --- a/news/sabnzbd/Makefile +++ b/news/sabnzbd/Makefile @@ -24,8 +24,10 @@ RUN_DEPENDS= cheetah:${PORTSDIR}/devel/py-cheetah \ USE_PYTHON= 2.4+ USE_PYDISTUTILS=yes +PYDISTUTILS_PKGNAME= SABnzbd PLIST_SUB= PORTNAME=${PORTNAME} +SUB_LIST+= PORTNAME=${PORTNAME} SUB_FILES= pkg-message OPTIONS= PAR2CMDLINE "Required for postprocessing of par files." on \ @@ -46,6 +48,9 @@ RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/feedparser.py:${PORTSDIR}/textproc/py-feedpar RUN_DEPENDS+= unrar:${PORTSDIR}/archivers/unrar .endif +post-patch: + @${REINPLACE_CMD} -e 's|%%PORTNAME%%|${PORTNAME}|' ${WRKSRC}/setup.py + post-install: ${CHMOD} -R go+r ${PREFIX}/share/${PORTNAME}/ ${CHMOD} -R go+r ${PREFIX}/share/doc/${PORTNAME}/ diff --git a/news/sabnzbd/files/patch-setup.py b/news/sabnzbd/files/patch-setup.py index 88078b40bde..62ada1a54c8 100644 --- a/news/sabnzbd/files/patch-setup.py +++ b/news/sabnzbd/files/patch-setup.py @@ -8,11 +8,11 @@ - ['SABnzbd.ini.sample', 'README.txt', 'LICENSE.txt', - 'TODO.txt', 'CHANGELOG.txt', 'UPGRADE.txt']), - ('share/SABnzbd-' + sabnzbd.__version__ + '/templates', -+ data_files = [('share/doc/SABnzbd', ++ data_files = [('share/doc/%%PORTNAME%%', + ['README.txt', 'LICENSE.txt', + 'TODO.txt', 'CHANGELOG.txt', 'UPGRADE.txt']), -+ ('share/SABnzbd',['SABnzbd.ini.sample']), -+ ('share/SABnzbd' + '/templates', ++ ('share/%%PORTNAME%%',['SABnzbd.ini.sample']), ++ ('share/%%PORTNAME%%' + '/templates', ['templates/default.css', 'templates/history.tmpl', 'templates/main.tmpl', 'templates/connection_info.tmpl', @@ -21,5 +21,5 @@ 'templates/config_rss.tmpl', 'templates/static/placeholder.txt']), - ('share/SABnzbd-' + sabnzbd.__version__ + '/templates/static', -+ ('share/SABnzbd/templates/static', ++ ('share/%%PORTNAME%%/templates/static', ['templates/static/placeholder.txt'])]) diff --git a/news/sabnzbd/files/pkg-message.in b/news/sabnzbd/files/pkg-message.in index 5bab6ca91f9..3dc21603619 100644 --- a/news/sabnzbd/files/pkg-message.in +++ b/news/sabnzbd/files/pkg-message.in @@ -1,6 +1,6 @@ **************************************************************************** -Check %%PREFIX%%/share/SABnzbd for SABnzbd.ini.sample and templates -See %%PREFIX%%/share/doc/SABnzbd for README.txt etc +Check %%PREFIX%%/share/%%PORTNAME%% for SABnzbd.ini.sample and templates +See %%PREFIX%%/share/doc/%%PORTNAME%% for README.txt etc **************************************************************************** diff --git a/news/sabnzbdplus/Makefile b/news/sabnzbdplus/Makefile index d14ff089f9d..325ca2ec7b5 100644 --- a/news/sabnzbdplus/Makefile +++ b/news/sabnzbdplus/Makefile @@ -24,8 +24,10 @@ RUN_DEPENDS= cheetah:${PORTSDIR}/devel/py-cheetah \ USE_PYTHON= 2.4+ USE_PYDISTUTILS=yes +PYDISTUTILS_PKGNAME= SABnzbd PLIST_SUB= PORTNAME=${PORTNAME} +SUB_LIST+= PORTNAME=${PORTNAME} SUB_FILES= pkg-message OPTIONS= PAR2CMDLINE "Required for postprocessing of par files." on \ @@ -46,6 +48,9 @@ RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/feedparser.py:${PORTSDIR}/textproc/py-feedpar RUN_DEPENDS+= unrar:${PORTSDIR}/archivers/unrar .endif +post-patch: + @${REINPLACE_CMD} -e 's|%%PORTNAME%%|${PORTNAME}|' ${WRKSRC}/setup.py + post-install: ${CHMOD} -R go+r ${PREFIX}/share/${PORTNAME}/ ${CHMOD} -R go+r ${PREFIX}/share/doc/${PORTNAME}/ diff --git a/news/sabnzbdplus/files/patch-setup.py b/news/sabnzbdplus/files/patch-setup.py index 88078b40bde..62ada1a54c8 100644 --- a/news/sabnzbdplus/files/patch-setup.py +++ b/news/sabnzbdplus/files/patch-setup.py @@ -8,11 +8,11 @@ - ['SABnzbd.ini.sample', 'README.txt', 'LICENSE.txt', - 'TODO.txt', 'CHANGELOG.txt', 'UPGRADE.txt']), - ('share/SABnzbd-' + sabnzbd.__version__ + '/templates', -+ data_files = [('share/doc/SABnzbd', ++ data_files = [('share/doc/%%PORTNAME%%', + ['README.txt', 'LICENSE.txt', + 'TODO.txt', 'CHANGELOG.txt', 'UPGRADE.txt']), -+ ('share/SABnzbd',['SABnzbd.ini.sample']), -+ ('share/SABnzbd' + '/templates', ++ ('share/%%PORTNAME%%',['SABnzbd.ini.sample']), ++ ('share/%%PORTNAME%%' + '/templates', ['templates/default.css', 'templates/history.tmpl', 'templates/main.tmpl', 'templates/connection_info.tmpl', @@ -21,5 +21,5 @@ 'templates/config_rss.tmpl', 'templates/static/placeholder.txt']), - ('share/SABnzbd-' + sabnzbd.__version__ + '/templates/static', -+ ('share/SABnzbd/templates/static', ++ ('share/%%PORTNAME%%/templates/static', ['templates/static/placeholder.txt'])]) diff --git a/news/sabnzbdplus/files/pkg-message.in b/news/sabnzbdplus/files/pkg-message.in index 5bab6ca91f9..3dc21603619 100644 --- a/news/sabnzbdplus/files/pkg-message.in +++ b/news/sabnzbdplus/files/pkg-message.in @@ -1,6 +1,6 @@ **************************************************************************** -Check %%PREFIX%%/share/SABnzbd for SABnzbd.ini.sample and templates -See %%PREFIX%%/share/doc/SABnzbd for README.txt etc +Check %%PREFIX%%/share/%%PORTNAME%% for SABnzbd.ini.sample and templates +See %%PREFIX%%/share/doc/%%PORTNAME%% for README.txt etc **************************************************************************** -- cgit