o Remove unnecessary post-patch entry, forcing socket reuse do not

seem to be required anymore
o Install public.key file under ${DATADIR} instead of ${DOCSDIR}
o Bump PORTREVISION
This commit is contained in:
Mario Sergio Fujikawa Ferreira 2005-11-21 02:29:09 +00:00
parent 894e379741
commit 9ee727a55e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=148910
8 changed files with 72 additions and 40 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= BitTorrent
PORTVERSION= 4.1.8
PORTREVISION= 1
PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES?= net python
MASTER_SITES= http://www.bittorrent.com/dl/ \
@ -44,9 +44,6 @@ PORTDOCS= \
EXTRA_PATCHES+= ${FILESDIR}/extra-noportdocs-setup.py
.endif
# always install the public key
PORTDOCS+= public.key
.include <bsd.port.pre.mk>
.if ${ARCH} != "i386"
@ -107,14 +104,17 @@ pre-everything::
@${ECHO_MSG} '===> Define WITHOUT_PSYCO to disable devel/py-psyco optimization'
.endif
pre-patch:
# do not install public.key, we will do it ourselves
@${REINPLACE_CMD} -E \
-e "s|^.*'public.key'.*$$||" \
${WRKSRC}/setup.py
post-patch:
# whrandom is deprecated: whrandom -> random
@${FIND} ${WRKSRC} -type f | \
${XARGS} -x -n 10 \
${REINPLACE_CMD} -E \
-e 's|whrandom|random|' \
-e 's|reuse=False|reuse=True|' \
-e 's|/usr/bin/env python.*|${LOCALBASE}/bin/python|'
# public.key will be located under ${DATADIR} not ${DOCSDIR}
@${REINPLACE_CMD} -E \
-e "s|%%DATADIR%%|'${DATADIR}/'|" \
${WRKSRC}/BitTorrent/NewVersion.py
post-install:
# set proper permissions
@ -126,13 +126,16 @@ post-install:
# pixmaps
@${CHMOD} -R ${SHAREMODE} \
${PREFIX}/share/pixmaps/${PORTNAME}/*
@${CHMOD} a+x \
@${CHMOD} a+X \
${PREFIX}/share/pixmaps/${PORTNAME}/logo
.endif
#.ifndef(NOPORTDOCS)
.ifndef(NOPORTDOCS)
# docs
@${CHMOD} -R ${SHAREMODE} \
${DOCSDIR}/*
#.endif
.endif
# public.key
@${MKDIR} ${DATADIR}
@${INSTALL_DATA} ${WRKSRC}/public.key ${DATADIR}
.include <bsd.port.post.mk>

View file

@ -1,8 +1,8 @@
--- setup.py.orig Tue Aug 23 23:09:42 2005
+++ setup.py Tue Aug 23 23:24:44 2005
@@ -58,4 +58,1 @@
--- setup.py.orig Mon Nov 21 00:10:24 2005
+++ setup.py Mon Nov 21 00:10:33 2005
@@ -72,5 +72,0 @@
- (doc_root , ['credits.txt', 'credits-l10n.txt',
- 'LICENSE.txt', 'README.txt',
- 'TRACKERLESS.txt', 'redirdonate.html',
- 'public.key',
+ (doc_root , ['public.key',
-
- ] ),

View file

@ -0,0 +1,11 @@
--- BitTorrent/NewVersion.py.orig Sun Nov 20 23:10:09 2005
+++ BitTorrent/NewVersion.py Sun Nov 20 23:10:37 2005
@@ -127,7 +127,7 @@
self.threadwrap(self.errorfunc, WARNING, '\n'.join(terrors))
if torrentfile and signature:
- public_key_file = open(os.path.join(doc_root, 'public.key'), 'rb')
+ public_key_file = open(os.path.join(%%DATADIR%%, 'public.key'), 'rb')
public_key = pickle.load(public_key_file)
h = sha(torrentfile).digest()
if public_key.verify(h, signature):

View file

@ -210,6 +210,7 @@ bin/torrentinfo-console
%%PYTHON_SITELIBDIR%%/khashmir/utkhashmir.py
%%PYTHON_SITELIBDIR%%/khashmir/utkhashmir.pyc
%%PYTHON_SITELIBDIR%%/khashmir/utkhashmir.pyo
%%DATADIR%%/public.key
share/locale/af/LC_MESSAGES/bittorrent.mo
share/locale/bg/LC_MESSAGES/bittorrent.mo
share/locale/ca/LC_MESSAGES/bittorrent.mo
@ -237,7 +238,7 @@ share/locale/vi/LC_MESSAGES/bittorrent.mo
share/locale/zh_CN/LC_MESSAGES/bittorrent.mo
share/locale/zh_TW/LC_MESSAGES/bittorrent.mo
%%GUI%%@dirrm share/pixmaps/BitTorrent/logo
%%GUI%%@dirrm share/pixmaps/BitTorrent
%%GUI%%@dirrm share/pixmaps/BitTorrent
%%GUI%%@unexec rmdir %D/share/pixmaps 2>/dev/null || true
@unexec rmdir %D/share/locale/zh_TW/LC_MESSAGES 2>/dev/null || true
@unexec rmdir %D/share/locale/zh_TW 2>/dev/null || true
@ -261,6 +262,7 @@ share/locale/zh_TW/LC_MESSAGES/bittorrent.mo
@unexec rmdir %D/share/locale/cs 2>/dev/null || true
@unexec rmdir %D/share/locale/ca/LC_MESSAGES 2>/dev/null || true
@unexec rmdir %D/share/locale/ca 2>/dev/null || true
@dirrm %%DATADIR%%
@dirrm %%PYTHON_SITELIBDIR%%/khashmir
@dirrm %%PYTHON_SITELIBDIR%%/BitTorrent
@unexec rmdir %D/%%PYTHON_SITELIBDIR%% 2>/dev/null || true

View file

@ -7,7 +7,7 @@
PORTNAME= BitTorrent
PORTVERSION= 4.1.8
PORTREVISION= 1
PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES?= net python
MASTER_SITES= http://www.bittorrent.com/dl/ \
@ -44,9 +44,6 @@ PORTDOCS= \
EXTRA_PATCHES+= ${FILESDIR}/extra-noportdocs-setup.py
.endif
# always install the public key
PORTDOCS+= public.key
.include <bsd.port.pre.mk>
.if ${ARCH} != "i386"
@ -107,14 +104,17 @@ pre-everything::
@${ECHO_MSG} '===> Define WITHOUT_PSYCO to disable devel/py-psyco optimization'
.endif
pre-patch:
# do not install public.key, we will do it ourselves
@${REINPLACE_CMD} -E \
-e "s|^.*'public.key'.*$$||" \
${WRKSRC}/setup.py
post-patch:
# whrandom is deprecated: whrandom -> random
@${FIND} ${WRKSRC} -type f | \
${XARGS} -x -n 10 \
${REINPLACE_CMD} -E \
-e 's|whrandom|random|' \
-e 's|reuse=False|reuse=True|' \
-e 's|/usr/bin/env python.*|${LOCALBASE}/bin/python|'
# public.key will be located under ${DATADIR} not ${DOCSDIR}
@${REINPLACE_CMD} -E \
-e "s|%%DATADIR%%|'${DATADIR}/'|" \
${WRKSRC}/BitTorrent/NewVersion.py
post-install:
# set proper permissions
@ -126,13 +126,16 @@ post-install:
# pixmaps
@${CHMOD} -R ${SHAREMODE} \
${PREFIX}/share/pixmaps/${PORTNAME}/*
@${CHMOD} a+x \
@${CHMOD} a+X \
${PREFIX}/share/pixmaps/${PORTNAME}/logo
.endif
#.ifndef(NOPORTDOCS)
.ifndef(NOPORTDOCS)
# docs
@${CHMOD} -R ${SHAREMODE} \
${DOCSDIR}/*
#.endif
.endif
# public.key
@${MKDIR} ${DATADIR}
@${INSTALL_DATA} ${WRKSRC}/public.key ${DATADIR}
.include <bsd.port.post.mk>

View file

@ -1,8 +1,8 @@
--- setup.py.orig Tue Aug 23 23:09:42 2005
+++ setup.py Tue Aug 23 23:24:44 2005
@@ -58,4 +58,1 @@
--- setup.py.orig Mon Nov 21 00:10:24 2005
+++ setup.py Mon Nov 21 00:10:33 2005
@@ -72,5 +72,0 @@
- (doc_root , ['credits.txt', 'credits-l10n.txt',
- 'LICENSE.txt', 'README.txt',
- 'TRACKERLESS.txt', 'redirdonate.html',
- 'public.key',
+ (doc_root , ['public.key',
-
- ] ),

View file

@ -0,0 +1,11 @@
--- BitTorrent/NewVersion.py.orig Sun Nov 20 23:10:09 2005
+++ BitTorrent/NewVersion.py Sun Nov 20 23:10:37 2005
@@ -127,7 +127,7 @@
self.threadwrap(self.errorfunc, WARNING, '\n'.join(terrors))
if torrentfile and signature:
- public_key_file = open(os.path.join(doc_root, 'public.key'), 'rb')
+ public_key_file = open(os.path.join(%%DATADIR%%, 'public.key'), 'rb')
public_key = pickle.load(public_key_file)
h = sha(torrentfile).digest()
if public_key.verify(h, signature):

View file

@ -210,6 +210,7 @@ bin/torrentinfo-console
%%PYTHON_SITELIBDIR%%/khashmir/utkhashmir.py
%%PYTHON_SITELIBDIR%%/khashmir/utkhashmir.pyc
%%PYTHON_SITELIBDIR%%/khashmir/utkhashmir.pyo
%%DATADIR%%/public.key
share/locale/af/LC_MESSAGES/bittorrent.mo
share/locale/bg/LC_MESSAGES/bittorrent.mo
share/locale/ca/LC_MESSAGES/bittorrent.mo
@ -237,7 +238,7 @@ share/locale/vi/LC_MESSAGES/bittorrent.mo
share/locale/zh_CN/LC_MESSAGES/bittorrent.mo
share/locale/zh_TW/LC_MESSAGES/bittorrent.mo
%%GUI%%@dirrm share/pixmaps/BitTorrent/logo
%%GUI%%@dirrm share/pixmaps/BitTorrent
%%GUI%%@dirrm share/pixmaps/BitTorrent
%%GUI%%@unexec rmdir %D/share/pixmaps 2>/dev/null || true
@unexec rmdir %D/share/locale/zh_TW/LC_MESSAGES 2>/dev/null || true
@unexec rmdir %D/share/locale/zh_TW 2>/dev/null || true
@ -261,6 +262,7 @@ share/locale/zh_TW/LC_MESSAGES/bittorrent.mo
@unexec rmdir %D/share/locale/cs 2>/dev/null || true
@unexec rmdir %D/share/locale/ca/LC_MESSAGES 2>/dev/null || true
@unexec rmdir %D/share/locale/ca 2>/dev/null || true
@dirrm %%DATADIR%%
@dirrm %%PYTHON_SITELIBDIR%%/khashmir
@dirrm %%PYTHON_SITELIBDIR%%/BitTorrent
@unexec rmdir %D/%%PYTHON_SITELIBDIR%% 2>/dev/null || true