diff options
author | Rob Austein <sra@hactrn.net> | 2011-01-23 02:38:21 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2011-01-23 02:38:21 +0000 |
commit | 8e3a5e7845c61b8d857b9fa84f862734f16c0315 (patch) | |
tree | afc07d7d97c02b53cf36d5592994b945f50f2744 | |
parent | 58bce7097714a14f7e58da439107be79e0adce84 (diff) |
Preliminary hacks for .rpm and .deb packaging
svn path=/rpkid/Makefile.in; revision=3639
-rw-r--r-- | rpkid/Makefile.in | 24 | ||||
-rw-r--r-- | rpkid/setup.py | 18 |
2 files changed, 31 insertions, 11 deletions
diff --git a/rpkid/Makefile.in b/rpkid/Makefile.in index 144dfc83..3c96c146 100644 --- a/rpkid/Makefile.in +++ b/rpkid/Makefile.in @@ -19,10 +19,18 @@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ -abs_top_srcdir = @abs_top_srcdir@ -abs_top_builddir = @abs_top_builddir@ - -SETUP_PY = AC_CFLAGS='${CFLAGS}' AC_LDFLAGS='${LDFLAGS}' AC_LIBS='${LIBS}' AC_SBINDIR='${sbindir}' AC_SCRIPTS='${SCRIPTS}' ${PYTHON} setup.py +abs_builddir = @abs_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +abs_top_builddir= @abs_top_builddir@ + +SETUP_PY = \ + AC_CFLAGS='${CFLAGS}' \ + AC_LDFLAGS='${LDFLAGS}' \ + AC_LIBS='${LIBS}' \ + AC_SBINDIR='${sbindir}' \ + AC_SCRIPTS='${SCRIPTS}' \ + AC_ABS_BUILDDIR='${abs_builddir}' \ + ${PYTHON} setup.py POW_SO = rpki/POW/_POW.so @@ -34,7 +42,13 @@ ${POW_SO}: ext/POW.c setup.py ${SETUP_PY} build_ext --inplace clean:: - rm -f ${POW_SO} + rm -rf ${POW_SO} build dist + +rpm deb:: all + ${SETUP_PY} bdist_rpm + +deb:: + cd dist; for i in *.rpm; do case $$i in *.src.rpm) :;; *) fakeroot alien $$i;; esac; done rpki/relaxng.py: ../scripts/make-relaxng.py left-right-schema.rng up-down-schema.rng publication-schema.rng ${PYTHON} ../scripts/make-relaxng.py >$@.tmp diff --git a/rpkid/setup.py b/rpkid/setup.py index 9f5082ef..131c2f56 100644 --- a/rpkid/setup.py +++ b/rpkid/setup.py @@ -20,11 +20,13 @@ import os # We can't build POW without these settings, but allow them to be null # so that things like "python setup.py --help" will work. -ac_cflags = os.getenv("AC_CFLAGS", "").split() -ac_ldflags = os.getenv("AC_LDFLAGS", "").split() -ac_libs = os.getenv("AC_LIBS", "").split() -ac_sbindir = os.getenv("AC_SBINDIR", "").strip() -ac_scripts = os.getenv("AC_SCRIPTS", "").split() +ac_cflags = os.getenv("AC_CFLAGS", "").split() +ac_ldflags = os.getenv("AC_LDFLAGS", "").split() +ac_libs = os.getenv("AC_LIBS", "").split() +ac_scripts = os.getenv("AC_SCRIPTS", "").split() + +ac_sbindir = os.getenv("AC_SBINDIR", "").strip() +ac_abs_builddir = os.getenv("AC_ABS_BUILDDIR", "").strip() # Non-standard extension build specification: we need to force # whatever build options our top-level ./configure selected, and we @@ -37,6 +39,10 @@ pow = Extension("rpki.POW._POW", ["ext/POW.c"], extra_compile_args = ac_cflags, extra_link_args = ac_ldflags + ac_libs) +# bdist_rpm seems to get confused by relative names for scripts + +scripts = ["%s/%s" % (ac_abs_builddir, f) for f in ac_scripts] + setup(name = "rpkitoolkit", version = "1.0", description = "RPKI Toolkit", @@ -44,4 +50,4 @@ setup(name = "rpkitoolkit", url = "http://www.rpki.net/", packages = ["rpki", "rpki.POW"], ext_modules = [pow], - data_files = [(ac_sbindir, ac_scripts)]) + data_files = [(ac_sbindir, scripts)]) |