# # Copyright (C) 2002-2004 Travis Shirk # # 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 of the License, 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 # DIST_NAME=eyeD3-0.6.11 DIST_TAR=${DIST_NAME}.tar DIST_GZ=${DIST_TAR}.gz DIST_RPM=${DIST_NAME}-1.noarch.rpm DIST_SRPM=${DIST_NAME}-1.src.rpm DIST_WWW=${DIST_NAME}-www.tar.gz PYTHON=/usr/local/bin/python2.5 RPM_DIR=/usr/local/rpm EBUILD_VERSION=0.6.11 ifdef RPM_BUILD_ROOT DESTDIR=${RPM_BUILD_ROOT} endif ifdef DESTDIR SETUP_ARGS=--root ${DESTDIR} endif prefix= exec_prefix:=${prefix} bindir:=$(subst //,/,${DESTDIR}/${exec_prefix}/bin) mandir:=$(subst //,/,${DESTDIR}/${prefix}/share/man) datadir:=$(subst //,/,${DESTDIR}/${prefix}/share) docdir:=/usr/local/share/doc/py25-eyed3 # Redefine these prefix:=$(subst //,/,${DESTDIR}/${prefix}) exec_prefix:=$(subst //,/,${DESTDIR}/${exec_prefix}) .PHONY: all install clean dist-clean maintainer-clean dist changelog \ tags TAGS rpm rpm-clean release docs docs-clean \ www push-www all: module docs module: ${PYTHON} setup.py build ${SETUP_ARGS_BUILD} install: all ${PYTHON} setup.py install ${SETUP_ARGS_INSTALL} ${SETUP_ARGS} install -m 755 -d ${bindir} install -m 755 bin/eyeD3 ${bindir} install -m 755 -d ${docdir} install -m 644 README ${docdir} install -m 644 AUTHORS ${docdir} install -m 644 THANKS ${docdir} install -m 644 COPYING ${docdir} gzip -f -9 ${docdir}/COPYING install -m 644 ChangeLog ${docdir} gzip -f -9 ${docdir}/ChangeLog install -m 755 -d ${mandir}/man1 cat doc/eyeD3.1 | gzip - > doc/eyeD3.1.gz install -m 644 doc/eyeD3.1.gz ${mandir}/man1 @# @# NOTE: When adding new files, the eyeD3.spec.in file and @# the uninstall taget must be updated as well. @# clean: -rm -rf build find . -name \*.pyc -exec rm '{}' \; dist-clean: clean -rm -rf autom4te*.cache ${DIST_NAME} ${DIST_GZ} ${DIST_WWW} ${DIST_RPM} ${DIST_SRPM} ${DIST_WWW} -rm setup.py -rm doc/eyeD3.1.gz -rm -f config.* *.bak -rm -rf src/config.h src/eyeD3/__init__.py -find . -name \*.pyc -exec rm '{}' \; -rm Makefile -rm .in maintainer-clean: docs-clean -rm -f configure src/config.h.in -rm etc/eyeD3.spec -rm doc/eyeD3.1 -rm README.t2t ${MAKE} dist-clean dist: docs dist-clean mkdir ${DIST_NAME} cp ChangeLog AUTHORS COPYING README README.html TODO NEWS\ THANKS INSTALL ${DIST_NAME} cp acsite.m4 configure setup.py.in Makefile.in ${DIST_NAME} mkdir ${DIST_NAME}/etc cp etc/eyeD3.spec.in ${DIST_NAME}/etc cp etc/gentoo/eyeD3-${EBUILD_VERSION}.ebuild ${DIST_NAME}/etc mkdir ${DIST_NAME}/src cp -r src/eyeD3 ${DIST_NAME}/src mkdir ${DIST_NAME}/bin cp bin/eyeD3 ${DIST_NAME}/bin mkdir ${DIST_NAME}/doc cp doc/eyeD3.1.in ${DIST_NAME}/doc find ${DIST_NAME} -type d -name CVS -print | xargs rm -rf find ${DIST_NAME} -type d -name ui -print | xargs rm -rf tar cf ${DIST_TAR} ${DIST_NAME} gzip ${DIST_TAR} rm -rf ${DIST_NAME} ./autogen.sh # XXX: rpmbuild is failing, but I stopped caring about RPMs along time ago, # leaving it up to maintainers #release: dist rpm www sloccount release: dist www sloccount # Re-bootstap to undo dist-clean ./autogen.sh > /dev/null 2>&1 rpm: rpm-clean cp etc/eyeD3.spec ${RPM_DIR}/SPECS cp ${DIST_GZ} ${RPM_DIR}/SOURCES rpmbuild -ba ${RPM_DIR}/SPECS/eyeD3.spec cp ${RPM_DIR}/RPMS/noarch/${DIST_RPM} . cp ${RPM_DIR}/SRPMS/${DIST_SRPM} . rpm-clean: -rm ${RPM_DIR}/SPECS/eyeD3.spec -rm ${RPM_DIR}/SOURCES/${DIST_GZ} -rm -rf ${RPM_DIR}/BUILD/${DIST_NAME} -rm ${RPM_DIR}/RPMS/noarch/${DIST_RPM} -rm ${RPM_DIR}/SRPMS/${DIST_SRPM} changelog: @if test -r ChangeLog; then \ cvs2cl.pl --fsf -r -U .users -P --accum;\ else\ cvs2cl.pl --fsf -r -U .users -P;\ fi tags TAGS: @if test -f tags; then \ rm tags; \ fi @ctags -R --exclude='tmp/*' --exclude='build/*' docs: if test -f README.t2t; then\ ${MAKE} README;\ ${MAKE} README.html;\ fi README: README.t2t txt2tags -t txt --stdout README.t2t >| README README.html: README.t2t txt2tags -t html --stdout README.t2t >| README.html docs-clean: -rm README -rm README.html www: -rm -rf ./www -mkdir -p www/eyeD3/releases -mkdir www/eyeD3/releases/gentoo #-mkdir www/eyeD3/releases/rpm cp README.html ChangeLog COPYING NEWS TODO THANKS www/eyeD3 cd www/eyeD3 && ln -s README.html index.html cp ${DIST_GZ} www/eyeD3/releases cp etc/gentoo/eyeD3-${EBUILD_VERSION}.ebuild www/eyeD3/releases/gentoo #cp ${DIST_RPM} www/eyeD3/releases/rpm #cp ${DIST_SRPM} www/eyeD3/releases/rpm tar czvf ${DIST_WWW} www rm -rf www push-www: scp ${DIST_WWW} nicfit:. ssh nicfit 'tar xzvf ${DIST_WWW}' sloccount: sloccount ./src ./bin sloccount --cached --details ./src ./bin