diff --git a/Makefile b/Makefile index 27eb7ca..dd0108a 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,18 @@ TAGGER_BASE := $(HOME)/Dropbox/tagger/comictagger -TAGGER_SRC := $(TAGGER_BASE)/src +TAGGER_SRC := $(TAGGER_BASE)/comictaggerlib VERSION_STR := $(shell grep version $(TAGGER_SRC)/ctversion.py| cut -d= -f2 | sed 's/\"//g') PASSWORD := $(shell cat $(TAGGER_BASE)/project_password.txt) UPLOAD_TOOL := $(TAGGER_BASE)/google/googlecode_upload.py all: clean clean: - rm -f *~ *.pyc *.pyo + rm -rf *~ *.pyc *.pyo cd comictagger; rm -f *~ *.pyc *.pyo sudo rm -rf MANIFEST dist scripts - rm -f logdict*.log + rm -rf logdict*.log make -C mac clean make -C windows clean + rm -rf *.deb zip: cd release; \ @@ -26,6 +27,26 @@ zip: pydist: python setup.py sdist --formats=gztar,zip +remove_test_install: + sudo rm -rf /usr/local/bin/comictagger.py + sudo rm -rf /usr/local/lib/python2.7/dist-packages/comictagger* + +deb: + fpm -s python -t deb \ + -n 'comictagger' \ + --category 'utilities' \ + --maintainer 'comictagger@gmail.com' \ + --after-install debian_scripts/after_install.sh \ + --before-remove debian_scripts/before_remove.sh \ + -d 'python >= 2.7' \ + -d 'python < 2.8' \ + -d 'python-imaging >= 1.1.7' \ + -d 'python-bs4 >= 4.1' \ + setup.py + + # For now, don't require PyQt, since command-line is available without it + #-d 'python-qt4 >= 4.8' + svn_tag: svn copy https://comictagger.googlecode.com/svn/trunk \ https://comictagger.googlecode.com/svn/tags/$(VERSION_STR) -m "Release $(VERSION_STR)" diff --git a/comictaggerlib/main.py b/comictaggerlib/main.py index 5d0c954..b1ea34f 100755 --- a/comictaggerlib/main.py +++ b/comictaggerlib/main.py @@ -1,5 +1,5 @@ """ -A python script to tag comic archives +A python app to (automatically) tag comic archives """ """ @@ -59,7 +59,7 @@ def ctmain(): if not qt_available and not opts.no_gui: opts.no_gui = True - print >> sys.stderr, "QT is not available." + print >> sys.stderr, "PyQt4 is not available. ComicTagger is limited to command-line mode." if opts.no_gui: cli.cli_mode( opts, settings ) @@ -84,11 +84,7 @@ def ctmain(): sys.exit(app.exec_()) except Exception, e: QtGui.QMessageBox.critical(QtGui.QMainWindow(), "Error", "Unhandled exception in app:\n" + traceback.format_exc() ) - -""" -if __name__ == "__main__": - main() -""" + diff --git a/debian_scripts/after_install.sh b/debian_scripts/after_install.sh new file mode 100755 index 0000000..a0dc1c2 --- /dev/null +++ b/debian_scripts/after_install.sh @@ -0,0 +1,2 @@ +#!/bin/bash +mv /usr/bin/comictagger.py /usr/bin/comictagger diff --git a/debian_scripts/before_remove.sh b/debian_scripts/before_remove.sh new file mode 100755 index 0000000..5080842 --- /dev/null +++ b/debian_scripts/before_remove.sh @@ -0,0 +1,2 @@ +#!/bin/bash +mv /usr/bin/comictagger /usr/bin/comictagger.py