Commit 4b61fee6 authored by Ryan Fisher's avatar Ryan Fisher
Browse files

Incorporating Steffen G Debian Packaging for Glue Split.

parent 8c40c60c
python-glue (1.36-2.2+squeeze3) unstable; urgency=low
* 1.36 multi-package build for Squeeze
* more clean-ups
-- Steffen Grunewald <steffen.grunewald@aei.mpg.de> Tue, 15 Nov 2011 16:45:00 +0100
python-glue (1.36-1.1+squeeze2) unstable; urgency=low
* 1.36 build for Squeeze
-- Steffen Grunewald <steffen.grunewald@aei.mpg.de> Thu, 27 Oct 2011 09:30:00 +0200
python-glue (1.36) unstable; urgency=low
* Initial release of 1.36
......
......@@ -2,15 +2,33 @@ Source: python-glue
Section: lscsoft
Priority: optional
Maintainer: Steffen Grunewald <steffen.grunewald@aei.mpg.de>
Build-Depends: debhelper (>= 5), python2.4-dev, python2.5-dev, git-core
Build-Depends: debhelper (>= 5), python-all-dev (>= 2.3.5-11), git-core
Standards-Version: 3.7.2
Package: python-glue
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, python (>= 2.4), python-cjson, python-m2crypto, python-pyxmpp (>= 1.0.1)
Recommends: python-numpy (>= 1.0), python-xml, python-pysqlite2 (>= 2.2), libsqlite3-0 (>= 3.3), pyrxp | python-pyrxp, python2.4, python2.5
Depends: ${shlibs:Depends}, ${misc:Depends}, python (>= 2.4), python-cjson, python-m2crypto, python-pyxmpp (>= 1.0.1), python-glue-segments
Recommends: python-numpy (>= 1.0), python-xml, python-pysqlite2 (>= 2.2), libsqlite3-0 (>= 3.3), pyrxp | python-pyrxp
Replaces: glue
Conflicts: glue
Description: The Grid LSC User Environment
Glue (Grid LSC User Environment) is a suite of python modules and programs to
allow users to run LSC codes on the grid.
Package: python-glue-segments
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, python (>= 2.4), python-cjson, python-m2crypto, python-pyxmpp (>= 1.0.1), python-glue-common
Recommends: python-numpy (>= 1.0), python-xml, python-pysqlite2 (>= 2.2), libsqlite3-0 (>= 3.3), pyrxp | python-pyrxp
Description: The Grid LSC User Environment
Glue (Grid LSC User Environment) is a suite of python modules and programs to
allow users to run LSC codes on the grid.
Segments handling part.
Package: python-glue-common
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, python (>= 2.4), python-cjson, python-m2crypto, python-pyxmpp (>= 1.0.1)
Recommends: python-numpy (>= 1.0), python-xml, python-pysqlite2 (>= 2.2), libsqlite3-0 (>= 3.3), pyrxp | python-pyrxp
Description: The Grid LSC User Environment
Glue (Grid LSC User Environment) is a suite of python modules and programs to
allow users to run LSC codes on the grid.
Common routines.
......@@ -2,6 +2,7 @@ This package was debianized by Kipp Cannon <kipp@gravity.phys.uwm.edu> on
2005-10-27.
This package was re-debianized by Steffen Grunewald <steffen.grunewald@aei.mpg.de> on
Wed, 10 Oct 2007 21:38:00 +0200, and later merged with Kipp's work repeatedly.
Uses pyversions since Fri, 11 Feb 2011.
Released versions can be downloaded from
http://www.lsc-group.phys.uwm.edu/daswg/download/software/
......@@ -15,6 +16,6 @@ Copyright: GPL
License:
The Debian packaging is (C) 2007, Steffen Grunewald <steffen.grunewald@aei.mpg.de> and
The Debian packaging is (C) 2011, Steffen Grunewald <steffen.grunewald@aei.mpg.de> and
is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
opt/lscsoft/glue/share/doc/glue
opt/lscsoft/glue/etc
# could be removed (kept for patching)
# Source this file to access GLUE
setenv GLUE_PREFIX /opt/lscsoft/glue
setenv PATH /opt/lscsoft/glue/bin:${PATH}
#setenv GLUE_PREFIX /opt/lscsoft/glue
setenv GLUE_PREFIX /usr
setenv PATH ${GLUE_PREFIX}/bin:${PATH}
# dynamically get python version (Carsten Aulbert)
setenv PYSITE_PATH python`python -V |& cut -d' ' -f2 | cut -d. -f-2`
if ( $?PYTHONPATH ) then
setenv PYTHONPATH /opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages:${PYTHONPATH}
setenv PYTHONPATH ${GLUE_PREFIX}/lib/${PYSITE_PATH}/site-packages:${PYTHONPATH}
else
setenv PYTHONPATH /opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages
setenv PYTHONPATH ${GLUE_PREFIX}/lib/${PYSITE_PATH}/site-packages
endif
if ( $?LD_LIBRARY_PATH ) then
setenv LD_LIBRARY_PATH /opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages:${LD_LIBRARY_PATH}
setenv LD_LIBRARY_PATH ${GLUE_PREFIX}/lib/${PYSITE_PATH}/site-packages:${LD_LIBRARY_PATH}
else
setenv LD_LIBRARY_PATH /opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages
setenv LD_LIBRARY_PATH ${GLUE_PREFIX}/lib/${PYSITE_PATH}/site-packages
endif
if ( $?DYLD_LIBRARY_PATH ) then
setenv DYLD_LIBRARY_PATH /opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages:${DYLD_LIBRARY_PATH}
setenv DYLD_LIBRARY_PATH ${GLUE_PREFIX}/lib/${PYSITE_PATH}/site-packages:${DYLD_LIBRARY_PATH}
else
setenv DYLD_LIBRARY_PATH /opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages
endif
# Source this file to access GLUE
setenv GLUE_PREFIX /opt/lscsoft/glue
setenv PATH /opt/lscsoft/glue/bin:${PATH}
# dynamically get python version (Carsten Aulbert)
setenv PYSITE_PATH python`python -V |& cut -d' ' -f2 | cut -d. -f-2`
if ( $?PYTHONPATH ) then
setenv PYTHONPATH /opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages:${PYTHONPATH}
else
setenv PYTHONPATH /opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages
endif
if ( $?LD_LIBRARY_PATH ) then
setenv LD_LIBRARY_PATH /opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages:${LD_LIBRARY_PATH}
else
setenv LD_LIBRARY_PATH /opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages
endif
if ( $?DYLD_LIBRARY_PATH ) then
setenv DYLD_LIBRARY_PATH /opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages:${DYLD_LIBRARY_PATH}
else
setenv DYLD_LIBRARY_PATH /opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages
setenv DYLD_LIBRARY_PATH ${GLUE_PREFIX}/lib/${PYSITE_PATH}/site-packages
endif
# Source this file to access GLUE
GLUE_PREFIX=/opt/lscsoft/glue
#GLUE_PREFIX=/opt/lscsoft/glue
GLUE_PREFIX=/usr
export GLUE_PREFIX
# dynamically get python version (Carsten Aulbert)
PYSITE_PATH=python`python -V 2>&1 | cut -d' ' -f2 | cut -d. -f-2`
PATH=/opt/lscsoft/glue/bin:${PATH}
PYTHONPATH=/opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages:${PYTHONPATH}
LD_LIBRARY_PATH=/opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages:${LD_LIBRARY_PATH}
DYLD_LIBRARY_PATH=/opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages:${DYLD_LIBRARY_PATH}
export PATH PYTHONPATH LD_LIBRARY_PATH DYLD_LIBRARY_PATH
# Source this file to access GLUE
GLUE_PREFIX=/opt/lscsoft/glue
export GLUE_PREFIX
# dynamically get python version (Carsten Aulbert)
PYSITE_PATH=python`python -V 2>&1 | cut -d' ' -f2 | cut -d. -f-2`
PATH=/opt/lscsoft/glue/bin:${PATH}
PYTHONPATH=/opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages:${PYTHONPATH}
LD_LIBRARY_PATH=/opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages:${LD_LIBRARY_PATH}
DYLD_LIBRARY_PATH=/opt/lscsoft/glue/lib/${PYSITE_PATH}/site-packages:${DYLD_LIBRARY_PATH}
PATH=${GLUE_PREFIX}/bin:${PATH}
PYTHONPATH=${GLUE_PREFIX}/lib/${PYSITE_PATH}/site-packages:${PYTHONPATH}
LD_LIBRARY_PATH=${GLUE_PREFIX}/lib/${PYSITE_PATH}/site-packages:${LD_LIBRARY_PATH}
DYLD_LIBRARY_PATH=${GLUE_PREFIX}/lib/${PYSITE_PATH}/site-packages:${DYLD_LIBRARY_PATH}
export PATH PYTHONPATH LD_LIBRARY_PATH DYLD_LIBRARY_PATH
......@@ -11,7 +11,12 @@
PACKAGE = python-glue
PREFIX = /opt/lscsoft/glue
#PREFIX = /opt/lscsoft/glue
PREFIX = /usr
# list of pythonX.Y available for release used for building
#PYVERS=$(shell pyversions -r)
PYVERS=$(shell pyversions -s)
CFLAGS = -Wall -g
......@@ -21,6 +26,18 @@ else
CFLAGS += -O2
endif
# $() expands to list of clean-pythonX.Y
clean: $(PYVERS:%=clean-%)
rm -f build-python* configure-stamp
clean-%:
dh_testdir
#dh_testroot
# -$(MAKE) clean
$* setup.py clean --all
-rm -rf build
dh_clean
configure: configure-stamp
configure-stamp:
dh_testdir
......@@ -28,69 +45,92 @@ configure-stamp:
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
# $() expands to list of build-pythonX.Y
build: $(PYVERS:%=build-%)
build-%:
dh_testdir
# $(MAKE)
# moved to install
#python setup.py build
# $* setup.py build
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# -$(MAKE) clean
-python2.4 setup.py clean --all
-rm -rf build
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/$(PACKAGE).
# $(MAKE) DESTDIR=$(CURDIR)/debian/$(PACKAGE) install
mkdir -p $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/share/doc/glue
# $() expands to list of install-pythonX.Y
install: build $(PYVERS:%=install-%)
# dh_testdir
# dh_testroot
# dh_clean -k
# dh_installdirs
# for some nasty reasons, setup.py replaces shebang lines with pythonX.Y call
# revert that!
set -e; \
for v in 2.4 2.5; do \
CFLAGS="$(CFLAGS)" \
python$$v setup.py build; \
CFLAGS="$(CFLAGS)" \
python$$v setup.py install \
--root=$(CURDIR)/debian/$(PACKAGE) \
--prefix=$(PREFIX) \
--record=$(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/share/doc/glue/INSTALLED_FILES; \
ls -lR $(CURDIR)/debian/$(PACKAGE)/$(PREFIX); \
python$$v setup.py clean --all; \
# fix executable name as setup.py inserts pythonX.Y
for i in `find debian/$(PACKAGE)/$(PREFIX)/bin -type f`; do \
echo $$i; \
if head -n1 $$i | grep -q '^#!.*python[0-9]\..' ; then \
sed -i '1s/python[0-9]\../python/' $$i; \
fi ; \
done
# python setup.py install \
# --root=$(CURDIR)/debian/$(PACKAGE) \
# --prefix=$(PREFIX) \
# --record=$(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/share/doc/glue/INSTALLED_FILES
# do we still need that? dh_fixperms might take care of those...
set -e; \
for i in `find debian -mindepth 2 -type f ! -perm 755`; do \
if head -n1 $$i | grep -q '^#!' ; then \
chmod +x $$i; \
fi ; \
done
set -e; \
for i in `find debian/$(PACKAGE)/$(PREFIX)/bin -type f`; do \
echo $$i; \
if head -n1 $$i | grep -q '^#!.*python2\..' ; then \
sed -i '1s/python2\../python/' $$i; \
fi ; \
# overwrite env scripts
for env in $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/etc/glue-user-env.* ; do \
cp $$env $$env.ORIG ; \
done
cp -p debian/glue-user-env.* $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/etc/
# if building with prefix /usr, move config files to /etc
if [ "$(PREFIX)" = "/usr" ]; then \
mkdir -p $(CURDIR)/debian/$(PACKAGE)/etc/ ; \
mv -f $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/etc/* $(CURDIR)/debian/$(PACKAGE)/etc/ ; \
rmdir $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/etc ; \
fi
rm -f $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/lib/python*/*/glue/__init__.py*
rm -f $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/lib/python*/*/glue/segments.py*
rm -f $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/lib/python*/*/glue/__segments.so*
rm -f $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/lib/python*/*/glue/iterutils.py*
rm -f $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/lib/python*/*/glue/git_version.py*
# exclude from main package:
rm -rf $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/etc
rm -rf $(CURDIR)/debian/$(PACKAGE)/etc
rm -rf $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/var
#rm -f $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/share/nmi/lalsuite-build*
rm -rf $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/share/nmi
rm -f $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/lib/python*/glue/cbcwebpage.py*
#
# clean up .pyo files
find $(CURDIR)/debian/*/$(PREFIX)/lib/python* -name '*.pyo' | xargs -r rm -f
# do not remove .pyc files
#find $(CURDIR)/debian/*/$(PREFIX)/lib/python* -name '*.pyc' | xargs -r rm -f
install-%:
# Add here commands to install the package into debian/$(PACKAGE).
# $(MAKE) DESTDIR=$(CURDIR)/debian/$(PACKAGE) install
mkdir -p $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/share/doc/$(PACKAGE)
CFLAGS="$(CFLAGS)" \
$* setup.py build
CFLAGS="$(CFLAGS)" \
$* setup.py install -O1 \
--root=$(CURDIR)/debian/$(PACKAGE) \
--prefix=$(PREFIX)
# --skip-build
# --record=$(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/share/doc/$(PACKAGE)/INSTALLED_FILES
# Split off some stuff to $(PACKAGE)-common and $(PACKAGE)-segments, remove from main tree
# *.install cannot handle this because of %exclude rules!
mkdir -p $(CURDIR)/debian/$(PACKAGE)-segments/$(PREFIX)/lib/
(cd $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/lib/; find python* -wholename '*/glue/segments.py*' | xargs tar cf -) | tar xf - -C $(CURDIR)/debian/$(PACKAGE)-segments/$(PREFIX)/lib/
(cd $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/lib/; find python* -wholename '*/glue/__segments.so*' | xargs tar cf -) | tar xf - -C $(CURDIR)/debian/$(PACKAGE)-segments/$(PREFIX)/lib/
#cd $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/lib/; find python* -wholename '*/src/segments' -type d | xargs tar cf -) | tar xf - -C $(CURDIR)/debian/$(PACKAGE)-segments/$(PREFIX)/lib/
#cd $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/lib/; find python* -wholename '*/test' -type d | xargs tar cf -) | tar xf - -C $(CURDIR)/debian/$(PACKAGE)-segments/$(PREFIX)/lib/
mkdir -p $(CURDIR)/debian/$(PACKAGE)-common/$(PREFIX)/lib
(cd $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/lib/; find python* -wholename '*/glue/__init__.py*' | xargs tar cf -) | tar xf - -C $(CURDIR)/debian/$(PACKAGE)-common/$(PREFIX)/lib/
(cd $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/lib/; find python* -wholename '*/glue/iterutils.py*' | xargs tar cf -) | tar xf - -C $(CURDIR)/debian/$(PACKAGE)-common/$(PREFIX)/lib/
(cd $(CURDIR)/debian/$(PACKAGE)/$(PREFIX)/lib/; find python* -wholename '*/glue/git_version.py*' | xargs tar cf -) | tar xf - -C $(CURDIR)/debian/$(PACKAGE)-common/$(PREFIX)/lib/
#
$* setup.py clean --all
binary: build install
dh_testdir
......@@ -100,7 +140,7 @@ binary: build install
dh_installexamples
# dh_install
# dh_installmenu
# dh_installdebconf
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment