mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-20 20:09:11 +00:00
New port: audio/coverhunter, a program fetching the covers of your digital music albums
CoverHunter will scan your digital music albums and try to get the cover image for each one. After that, if more than one cover was found, you can choose wich one will be set as the cover for that album. These covers may be used by XMMS, KDE, GNOME, etc. PR: ports/69053 Submitted by: Jean-Yves Lefort <jylefort@brutele.be>
This commit is contained in:
parent
1e9bcc9e25
commit
fbcc2f642a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=119337
@ -52,6 +52,7 @@
|
||||
SUBDIR += chordpack
|
||||
SUBDIR += cmp3
|
||||
SUBDIR += cmt
|
||||
SUBDIR += coverhunter
|
||||
SUBDIR += cplay
|
||||
SUBDIR += crip
|
||||
SUBDIR += csound
|
||||
|
64
audio/coverhunter/Makefile
Normal file
64
audio/coverhunter/Makefile
Normal file
@ -0,0 +1,64 @@
|
||||
# New ports collection makefile for: coverhunter
|
||||
# Date created: 14 Jul 2004
|
||||
# Whom: Jean-Yves Lefort <jylefort@brutele.be>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= coverhunter
|
||||
PORTVERSION= 0.3
|
||||
CATEGORIES= audio graphics
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||
|
||||
MAINTAINER= jylefort@brutele.be
|
||||
COMMENT= A program fetching the covers of your digital music albums
|
||||
|
||||
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging
|
||||
|
||||
USE_X_PREFIX= yes
|
||||
USE_GNOME= pygtk2
|
||||
USE_PYTHON= 2.3+
|
||||
USE_REINPLACE= yes
|
||||
NO_BUILD= yes
|
||||
|
||||
PYC= PYTHON="${PYTHON_CMD}" ${SH} ${SCRIPTDIR}/py-compile
|
||||
|
||||
BINDIR= ${PREFIX}/bin
|
||||
PKGLIBDIR= ${PREFIX}/lib/coverhunter
|
||||
|
||||
MODULES= __init__.py \
|
||||
album.py \
|
||||
amazon.py \
|
||||
config.py \
|
||||
libhunter.py \
|
||||
musicfile.py \
|
||||
source.py
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e \
|
||||
's|@PYTHON_CMD@|${PYTHON_CMD}|; \
|
||||
s|@PKGLIBDIR@|${PKGLIBDIR}|; \
|
||||
s|@DATADIR@|${DATADIR}|' ${WRKSRC}/bin/coverhunter
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${BINDIR}
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/bin/coverhunter ${BINDIR}
|
||||
${MKDIR} ${PKGLIBDIR}
|
||||
.for module in ${MODULES}
|
||||
${INSTALL_DATA} ${WRKSRC}/lib/${module} ${PKGLIBDIR}
|
||||
${PYC} --basedir ${PKGLIBDIR} ${PKGLIBDIR}/${module}
|
||||
.endfor
|
||||
${MKDIR} ${DATADIR}
|
||||
${INSTALL_DATA} \
|
||||
${WRKSRC}/data/CoverHunter.glade \
|
||||
${WRKSRC}/data/fetch_all.png \
|
||||
${WRKSRC}/data/nocover.gif \
|
||||
${WRKSRC}/data/picture.png \
|
||||
${WRKSRC}/data/searching.png \
|
||||
${DATADIR}
|
||||
|
||||
post-install:
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.mk>
|
2
audio/coverhunter/distinfo
Normal file
2
audio/coverhunter/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
MD5 (coverhunter-0.3.tar.gz) = 005077d047b903b1dafa3f7943c85a40
|
||||
SIZE (coverhunter-0.3.tar.gz) = 27496
|
35
audio/coverhunter/files/patch-bin::coverhunter
Normal file
35
audio/coverhunter/files/patch-bin::coverhunter
Normal file
@ -0,0 +1,35 @@
|
||||
--- bin/coverhunter.orig Wed Jul 14 14:57:49 2004
|
||||
+++ bin/coverhunter Wed Jul 14 15:01:58 2004
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! @PYTHON_CMD@
|
||||
# Copyright (c) 2003,2004 Guilherme Salgado
|
||||
# All rights reserved.
|
||||
#
|
||||
@@ -22,15 +22,8 @@
|
||||
#
|
||||
|
||||
import os, sys, tempfile, threading, traceback, urllib2
|
||||
-if os.path.exists('CVS'):
|
||||
- # developer mode, coverhunter hasn't been installed
|
||||
- prefix = '.'
|
||||
- DEBUG = True
|
||||
-else:
|
||||
- base_dir = os.path.split(os.path.dirname(sys.argv[0]))[0]
|
||||
- prefix = os.path.join(base_dir, 'lib', 'coverhunter')
|
||||
- DEBUG = False
|
||||
-sys.path.append(os.path.join(prefix, 'lib'))
|
||||
+DEBUG = False
|
||||
+sys.path.append('@PKGLIBDIR@')
|
||||
|
||||
import Image
|
||||
import pygtk ; pygtk.require('2.0')
|
||||
@@ -440,7 +433,7 @@
|
||||
|
||||
|
||||
def find_datafile(filename):
|
||||
- return os.path.join(prefix, 'data', filename)
|
||||
+ return os.path.join('@DATADIR@', filename)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
9
audio/coverhunter/pkg-descr
Normal file
9
audio/coverhunter/pkg-descr
Normal file
@ -0,0 +1,9 @@
|
||||
CoverHunter will scan your digital music albums and try to get the
|
||||
cover image for each one. After that, if more than one cover was
|
||||
found, you can choose wich one will be set as the cover for that
|
||||
album. These covers may be used by XMMS, KDE, GNOME, etc.
|
||||
|
||||
WWW: http://sourceforge.net/projects/coverhunter/
|
||||
|
||||
- Jean-Yves Lefort
|
||||
jylefort@brutele.be
|
7
audio/coverhunter/pkg-message
Normal file
7
audio/coverhunter/pkg-message
Normal file
@ -0,0 +1,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
To use coverhunter, you need an Amazon Developer's Token (freely
|
||||
available at https://associates.amazon.com/exec/panama/associates/join/developer/application.html).
|
||||
|
||||
Once you got your token, set it using the "Settings -> Set Amazon
|
||||
Token" menu item.
|
||||
-------------------------------------------------------------------------------
|
29
audio/coverhunter/pkg-plist
Normal file
29
audio/coverhunter/pkg-plist
Normal file
@ -0,0 +1,29 @@
|
||||
bin/coverhunter
|
||||
lib/coverhunter/__init__.py
|
||||
lib/coverhunter/__init__.pyc
|
||||
lib/coverhunter/__init__.pyo
|
||||
lib/coverhunter/album.py
|
||||
lib/coverhunter/album.pyc
|
||||
lib/coverhunter/album.pyo
|
||||
lib/coverhunter/amazon.py
|
||||
lib/coverhunter/amazon.pyc
|
||||
lib/coverhunter/amazon.pyo
|
||||
lib/coverhunter/config.py
|
||||
lib/coverhunter/config.pyc
|
||||
lib/coverhunter/config.pyo
|
||||
lib/coverhunter/libhunter.py
|
||||
lib/coverhunter/libhunter.pyc
|
||||
lib/coverhunter/libhunter.pyo
|
||||
lib/coverhunter/musicfile.py
|
||||
lib/coverhunter/musicfile.pyc
|
||||
lib/coverhunter/musicfile.pyo
|
||||
lib/coverhunter/source.py
|
||||
lib/coverhunter/source.pyc
|
||||
lib/coverhunter/source.pyo
|
||||
%%DATADIR%%/CoverHunter.glade
|
||||
%%DATADIR%%/fetch_all.png
|
||||
%%DATADIR%%/nocover.gif
|
||||
%%DATADIR%%/picture.png
|
||||
%%DATADIR%%/searching.png
|
||||
@dirrm lib/coverhunter
|
||||
@dirrm %%DATADIR%%
|
92
audio/coverhunter/scripts/py-compile
Normal file
92
audio/coverhunter/scripts/py-compile
Normal file
@ -0,0 +1,92 @@
|
||||
#!/bin/sh
|
||||
|
||||
# py-compile - Compile a Python program
|
||||
# Copyright 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# called as "py-compile [--basedir DIR] PY_FILES ...
|
||||
|
||||
if [ -z "$PYTHON" ]; then
|
||||
PYTHON=python
|
||||
fi
|
||||
|
||||
basedir=
|
||||
|
||||
case "$1" in
|
||||
--basedir)
|
||||
basedir=$2
|
||||
shift 2
|
||||
;;
|
||||
--help)
|
||||
echo "Usage: py-compile [--basedir DIR] PY_FILES ..."
|
||||
echo "Byte compile some python scripts. This should be performed"
|
||||
echo "after they have been moved to the final installation location"
|
||||
exit 0
|
||||
;;
|
||||
--version)
|
||||
echo "py-compile version 0.0"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ $# = 0 ]; then
|
||||
echo "No files given to $0" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# if basedir was given, then it should be prepended to filenames before
|
||||
# byte compilation.
|
||||
if [ -z "$basedir" ]; then
|
||||
trans="path = file"
|
||||
else
|
||||
trans="path = os.path.join('$basedir', file)"
|
||||
fi
|
||||
|
||||
$PYTHON -c "
|
||||
import sys, os, string, py_compile
|
||||
|
||||
files = '''$*'''
|
||||
print 'Byte-compiling python modules...'
|
||||
for file in string.split(files):
|
||||
$trans
|
||||
if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'):
|
||||
continue
|
||||
print file,
|
||||
sys.stdout.flush()
|
||||
py_compile.compile(path)
|
||||
print" || exit $?
|
||||
|
||||
# this will fail for python < 1.5, but that doesn't matter ...
|
||||
$PYTHON -O -c "
|
||||
import sys, os, string, py_compile
|
||||
|
||||
files = '''$*'''
|
||||
print 'Byte-compiling python modules (optimised versions) ...'
|
||||
for file in string.split(files):
|
||||
$trans
|
||||
if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'):
|
||||
continue
|
||||
print file,
|
||||
sys.stdout.flush()
|
||||
py_compile.compile(path)
|
||||
print" 2>/dev/null || :
|
||||
|
Loading…
Reference in New Issue
Block a user