Reorganize build process
Now using Python's distutils for installing the Python modules into the wrong place and python-support for moving them into the right place, byte-compiling, and all that jazz.
This commit is contained in:
parent
986151bca6
commit
9a56175919
2
bin/ceo
2
bin/ceo
|
@ -1,3 +1,3 @@
|
|||
#!/usr/bin/python2.4 --
|
||||
#!/usr/bin/python
|
||||
import csc.apps.urwid.main
|
||||
csc.apps.urwid.main.start()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python2.4 --
|
||||
#!/usr/bin/python
|
||||
"""
|
||||
ceoquery - a script to lookup member and account information
|
||||
"""
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python2.4 --
|
||||
#!/usr/bin/python
|
||||
"""
|
||||
chfn - change real user name and information
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python2.4 --
|
||||
#!/usr/bin/python
|
||||
"""
|
||||
chsh - change login shell
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/ceo.substvars
|
||||
/ceo
|
||||
/files
|
||||
/*.debhelper
|
||||
|
|
|
@ -1 +1 @@
|
|||
4
|
||||
5
|
||||
|
|
|
@ -2,12 +2,12 @@ Source: ceo
|
|||
Section: admin
|
||||
Priority: optional
|
||||
Maintainer: Michael Spang <mspang@uwaterloo.ca>
|
||||
Build-Depends: debhelper (>= 4.0.0)
|
||||
Build-Depends: debhelper (>= 5.0.0), python-dev (>= 2.4), python-support (>= 0.3), libkrb5-dev, libldap2-dev, libsasl2-dev
|
||||
Standards-Version: 3.7.2
|
||||
|
||||
Package: ceo
|
||||
Architecture: any
|
||||
Depends: python2.4, python-ldap, python-urwid, krb5-user, less, python-pam, ${shlibs:Depends}
|
||||
Depends: python-ldap, python-urwid, python-pam, ${python:Depends}, ${shlibs:Depends}
|
||||
Recommends: quota
|
||||
Description: Computer Science Club Administrative Utilities
|
||||
This package contains the CSC Electronic Office
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
usr/bin
|
||||
etc/csc
|
||||
etc/ldap/schema
|
|
@ -0,0 +1 @@
|
|||
docs/*
|
|
@ -0,0 +1,2 @@
|
|||
etc/accounts.cf etc/kerberos.cf etc/ldap.cf etc/csc
|
||||
etc/csc.schema etc/ldap/schema
|
|
@ -1,48 +1,36 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
PYTHON := python2.4
|
||||
|
||||
build:
|
||||
python setup.py -q build
|
||||
cd src && make
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean
|
||||
rm -f build-stamp
|
||||
rm -rf build/
|
||||
find pylib/ -name "*.pyc" -print0 | xargs -0 rm -f
|
||||
cd src && make clean
|
||||
$(MAKE) -C src clean
|
||||
python setup.py -q clean -a
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
|
||||
dh_installdirs etc/csc usr/lib/$(PYTHON)/site-packages usr/share/csc \
|
||||
usr/lib/csc usr/bin etc/ldap/schema
|
||||
dh_install pylib/* usr/lib/$(PYTHON)/site-packages/
|
||||
dh_install etc/* etc/csc/
|
||||
|
||||
dh_install bin/ceo bin/ceoquery bin/csc-chsh bin/csc-chfn src/addmember src/addclub usr/bin/
|
||||
dh_install misc/csc.schema etc/ldap/schema/
|
||||
dh_installdirs
|
||||
python setup.py -q install --no-compile -O0 --root=debian/ceo
|
||||
$(MAKE) -C src DESTDIR=$(PWD)/debian/ceo PREFIX=/usr install
|
||||
|
||||
binary-arch: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs
|
||||
dh_installdocs docs/*
|
||||
dh_installdocs
|
||||
dh_installexamples
|
||||
dh_install
|
||||
# dh_installlogrotate
|
||||
# dh_installcron
|
||||
dh_installman
|
||||
dh_link
|
||||
dh_strip
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
# dh_perl
|
||||
# dh_python
|
||||
# dh_makeshlibs
|
||||
dh_pysupport
|
||||
dh_installdeb
|
||||
dh_shlibdeps
|
||||
dh_gencontrol
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from distutils.core import setup
|
||||
|
||||
setup(
|
||||
name='ceo',
|
||||
description='CSC Electronic Office',
|
||||
packages=[ 'csc', 'csc.common', 'csc.adm', 'csc.backends', 'csc.apps', 'csc.apps.urwid' ],
|
||||
package_dir = {'': 'pylib'},
|
||||
scripts=['bin/ceo', 'bin/ceoquery', 'bin/csc-chfn', 'bin/csc-chsh'],
|
||||
)
|
||||
|
|
@ -5,6 +5,9 @@ KADM := $(shell krb5-config --libs krb5 kadm-client)
|
|||
|
||||
LIBCEO := util.o common.o config.o parser.o ldap.o krb5.o kadm.o addhomedir.o
|
||||
|
||||
DESTDIR :=
|
||||
PREFIX := /usr/local
|
||||
|
||||
all: addmember addclub
|
||||
|
||||
clean:
|
||||
|
@ -18,3 +21,8 @@ addclub: $(LIBCEO) addclub.o
|
|||
|
||||
config-test: config-test.o parser.o util.o
|
||||
$(CC) $(LDFLAGS) $^ -o $@
|
||||
|
||||
install: addmember addclub
|
||||
install -d $(DESTDIR)$(PREFIX)/bin
|
||||
install addmember addclub $(DESTDIR)$(PREFIX)/bin
|
||||
|
||||
|
|
Loading…
Reference in New Issue