Subversion Repositories pub

Compare Revisions

No changes between revisions

Ignore whitespace Rev 599 → Rev 600

/relevation/branches/1.3/debian/control
2,7 → 2,7
Section: contrib/utils
Priority: extra
Maintainer: Toni Corvera <outlyer@gmail.com>
Build-Depends: debhelper (>= 7.0.50~), python-support (>= 0.90)
Build-Depends: debhelper (>= 7.0.50~), python (>= 2.6), python-support (>= 0.90)
X-Python-Version: >= 2.3
Standards-Version: 3.9.1
Homepage: http://p.outlyer.net/relevation/
/relevation/branches/1.3/GNUmakefile
18,6 → 18,13
MANROOT=$(INSTALLROOT)/share/man
# Where to install additional packages
PYTHONROOT=$(DESTDIR)$(shell python -c "import sys;from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$(prefix)')")
DUSETUP=python setup.py # Distutils' setup
# Debian derived systems need special treatment for clean uninstalls
# since it uses different than standard directories
INSTALL_LAYOUT=
ifeq ($(findstring dist-packages,$(PYTHONROOT)),dist-packages)
INSTALL_LAYOUT=--install-layout=deb
endif
 
all: $(PKG).1
 
33,31 → 40,33
@echo INSTALLROOT=$(INSTALLROOT)
@echo MANROOT=$(MANROOT)
@echo PYTHONROOT=$(PYTHONROOT)
@echo INSTALL_LAYOUT=$(INSTALL_LAYOUT)
 
setup.py: devtools/setup.py.in
sed 's/@VERSION@/$(VERSION)/g' < $< > $@
 
clean:
-$(RM) *.pyc *.pyo manpage.html manpage.pdf $(PKG).spec
-$(RM) *.pyc *.pyo manpage.html manpage.pdf $(PKG).spec setup.py
 
distclean: clean
-$(RM) $(PKGVER).tar.gz $(PKGVER).zip
-$(RM) -r dist build $(PKGVER)/
 
install:
install -D -m755 src/$(PKG).py $(INSTALLROOT)/bin/$(PKG)
install -D -m644 $(PKG).1 $(MANROOT)/man1/$(PKG).1
install -d $(PYTHONROOT)/$(PKG)
install -D -m644 src/$(PKG)/*.py $(PYTHONROOT)/$(PKG)/
# Extra tools
install -d $(INSTALLROOT)/share/doc/$(PKG)/extra
install -D -m755 src/gui.py devtools/*.py $(INSTALLROOT)/share/doc/$(PKG)/extra/
install: setup.py
$(DUSETUP) install --prefix=$(DESTDIR)$(prefix) $(INSTALL_LAYOUT)
 
# There's no distutils uninstall
uninstall:
-$(RM) $(INSTALLROOT)/bin/$(PKG) $(INSTALLROOT)/share/man/man1/$(PKG).1
-for tool in gui.py devtools/*.py; do \
$(RM) $(INSTALLROOT)/share/doc/$(PKG)/extra/`basename $$tool` ; \
done
-$(RM) $(PYTHONROOT)/$(PKG)/*
-$(RM) $(PYTHONROOT)/$(PKGVER).egg-info
-rmdir --parents $(INSTALLROOT)/share/doc/$(PKG)/extra/ \
$(MANROOT)/man1/ \
$(INSTALLROOT)/bin/
$(INSTALLROOT)/bin/ \
$(PYTHONROOT)/$(PKG)/
 
$(PKG).1: manpage_source.sgml
docbook-to-man $< > $@
80,15 → 89,19
dist: $(PKGVER).tar.gz $(PKGVER).zip
-$(RM) -r $(PKGVER)
 
$(PKGVER).tar.gz: is_release distclean $(PKG).spec package_copy
tar cv $(PKGVER) | gzip -c9 > $(PKGVER).tar.gz
tarball: $(PKGVER).tar.gz
 
$(PKGVER).tar.gz: is_release distclean $(PKG).spec setup.py
$(DUSETUP) sdist -u root -g root --formats=gztar && mv dist/$@ .
 
zip: $(PKGVER).zip
 
$(PKGVER).zip: is_release distclean manpage.pdf manpage.html $(PKG).spec package_copy
cp manpage.pdf manpage.html $(PKGVER)
zip -9 -r $(PKGVER).zip $(PKGVER)
-$(RM) $(PKGVER)/manpage.pdf $(PKGVER)/manpage.html
$(PKGVER).zip: is_release distclean manpage.pdf manpage.html $(PKG).spec setup.py
@# Specifial manifest with additional files
cp MANIFEST.in MANIFEST.in.tmp
echo include manpage.pdf manpage.html >> MANIFEST.in.tmp
$(DUSETUP) sdist --formats=zip --template MANIFEST.in.tmp && mv dist/$@ .
-$(RM) MANIFEST.in.tmp MANIFEST
 
$(PKG).spec: $(PKG).spec.in
test -n "$(VERSION)" # Version (=$(VERSION)) must be defined
/relevation/branches/1.3/src/relevation.py
72,7 → 72,7
sys.stderr.write('Either PyCrypto or cryptopy is required\n')
raise
 
RELEASE=not True
RELEASE=True
__author__ = 'Toni Corvera'
__date__ = '$Date$'
__revision__ = '$Rev$'
/relevation/branches/1.3/MANIFEST.in
0,0 → 1,6
# $Id$
include CHANGELOG GNUmakefile LICENSE manpage_source.sgml README.Windows.txt relevation.spec relevation.spec.in
graft debian
graft devtools
graft win
 
Property changes:
Added: svn:keywords
+Rev Id Date
\ No newline at end of property
/relevation/branches/1.3/devtools/setup.py.in
0,0 → 1,45
#!/usr/bin/env python
# $Id$
# This script isn't used directly to generate the distributed files
# since some files are generated from the source and the zip and tar.gz
# differ.
# GNU Make is used instead.
 
from distutils.core import setup
import distutils.command.install_scripts
import shutil
 
class my_install(distutils.command.install_scripts.install_scripts):
''' Rename scripts that use the .py extension after installation.
NOTE: breaks bdist_rpm
Reference: http://stackoverflow.com/questions/4359231/rename-script-file-in-distutils
'''
def run(self):
distutils.command.install_scripts.install_scripts.run(self)
for script in self.get_outputs():
if script.endswith(".py"):
shutil.move(script, script[:-3])
 
setup(name='relevation',
version='@VERSION@',
author='Toni Corvera',
author_email='outlyer@gmail.com',
url='http://p.outlyer.net/relevation',
description='Command-line interface to query Revelation files',
long_description=
'''This is a command-line tool capable of retrieving passwords from a Revelation password file.
 
Please note files can only be searched, not edited with this tool.''',
license='BSD',
package_dir={'': 'src'},
packages=['relevation'],
scripts=['src/relevation.py'],
cmdclass = {"install_scripts": my_install}, # hook
data_files=[
('share/man/man1/', ['relevation.1']),
#('share/doc/relevation', ['CHANGELOG']),
('share/doc/relevation/extra', ['src/gui.py','devtools/checkpw.py','devtools/genpw.py']),
]
)
 
# vim:set ts=4 et ai: #
Property changes:
Added: svn:keywords
+Rev Id Date
\ No newline at end of property
/relevation/branches/1.3
Property changes:
Modified: svn:ignore
relevation.spec
+setup.py
+MANIFEST