diff options
author | Rob Austein <sra@hactrn.net> | 2011-01-21 19:09:42 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2011-01-21 19:09:42 +0000 |
commit | 744d01a905351d244b12a1895303882797218ae8 (patch) | |
tree | 796528af4ada3c84c863bf24955da324b4f65b2b | |
parent | 3f3019d66dd91fd3277dae7b82d203dd0e35a2b2 (diff) |
Basic "make install" and "make deinstall" now works for rpkid/
directory. No doubt I'm still forgetting something, eg, schema files
needed for setup, but basic mechanism seems to work.
svn path=/rpkid/Makefile.in; revision=3625
-rw-r--r-- | rpkid/Makefile.in | 34 | ||||
-rw-r--r-- | rpkid/irbe_cli.usage | 63 | ||||
-rw-r--r-- | rpkid/rpki-sql-backup.py (renamed from rpkid/backup-sql.py) | 0 | ||||
-rw-r--r-- | rpkid/rpki-sql-setup.py (renamed from rpkid/sql-setup.py) | 0 | ||||
-rw-r--r-- | rpkid/rpki-start-servers.py (renamed from rpkid/start-servers.py) | 0 | ||||
-rw-r--r-- | rpkid/rpki/__doc__.py.in | 6 | ||||
-rw-r--r-- | rpkid/setup.py | 7 |
7 files changed, 26 insertions, 84 deletions
diff --git a/rpkid/Makefile.in b/rpkid/Makefile.in index 228ebd57..99a8be23 100644 --- a/rpkid/Makefile.in +++ b/rpkid/Makefile.in @@ -15,21 +15,26 @@ datadir = @datadir@ localstatedir = @localstatedir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ +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}' ${PYTHON} setup.py +SETUP_PY = AC_CFLAGS='${CFLAGS}' AC_LDFLAGS='${LDFLAGS}' AC_LIBS='${LIBS}' AC_SBINDIR='${sbindir}' AC_SCRIPTS='${SCRIPTS}' ${PYTHON} setup.py -EXECUTABLES = backup-sql sql-setup start-servers irbe_cli irdbd myrpki pubd rootd rpkid +POW_SO = rpki/POW/_POW.so -all: rpki/pow/_POW.so rpki/relaxng.py myrpki.rng ${EXECUTABLES} +SCRIPTS = rpki-sql-backup rpki-sql-setup rpki-start-servers irbe_cli irdbd myrpki pubd rootd rpkid -rpki/pow/_POW.so: ext/POW.c setup.py +all: ${POW_SO} rpki/relaxng.py myrpki.rng ${SCRIPTS} + +${POW_SO}: ext/POW.c setup.py ${SETUP_PY} build_ext --inplace clean:: - rm -f rpki/POW/_POW.so + rm -f ${POW_SO} rpki/relaxng.py: ../scripts/make-relaxng.py left-right-schema.rng up-down-schema.rng publication-schema.rng ${PYTHON} ../scripts/make-relaxng.py >$@.tmp @@ -50,13 +55,16 @@ myrpki.rng: myrpki.rnc clean:: find . -type f -name '*.py[co]' -delete cd tests; $(MAKE) $@ - rm -f ${EXECUTABLES} + rm -f ${SCRIPTS} install: ${SETUP_PY} install uninstall deinstall: - d=`${PYTHON} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()'`; rm -rfv $$d/rpki $$d/`${SETUP_PY} --fullname`-*.egg-info + dir=`${PYTHON} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()'`; \ + egg=`${PYTHON} setup.py --fullname`; \ + rm -rfv $$dir/rpki $$dir/$$egg-*.egg-info; \ + for i in ${SCRIPTS}; do rm -fv ${sbindir}/$$i; done dont-run-trang: touch *.rng @@ -77,10 +85,6 @@ all-tests:: relaxng test all-tests parse-test profile yamltest:: cd tests; $(MAKE) $@ - -irbe_cli.usage: irbe_cli.py - ${PYTHON} irbe_cli.py --help | sed 's/^/ /' >$@ - tags: Makefile find . -type f \( -name '*.py' -o -name '*.sql' -o -name '*.rnc' -o -name '*.py.in' \) ! -name relaxng.py ! -name __doc__.py | etags - @@ -145,17 +149,17 @@ distclean: clean docclean cd tests; ${MAKE} $@ rm -f TAGS rpki/__doc__.py Makefile -COMPILE_COMMON = AC_RPKI_CONFIG_DIR='${sysconfdir}' ${PYTHON} ${abs_top_srcdir}/buildtools/make-python-executable.py <$? >$@; chmod +x $@ +COMPILE_COMMON = AC_RPKI_CONFIG_DIR='${sysconfdir}' ${PYTHON} ${abs_top_srcdir}/buildtools/make-python-executable.py <$? >$@; chmod 555 $@ COMPILE_PYTHON = AC_PYTHON_INTERPRETER='${PYTHON}' ${COMPILE_COMMON} COMPILE_PYWRAP = AC_PYTHON_INTERPRETER='${PYWRAP}' ${COMPILE_COMMON} -backup-sql: backup-sql.py +rpki-sql-backup: rpki-sql-backup.py ${COMPILE_PYTHON} -sql-setup: sql-setup.py +rpki-sql-setup: rpki-sql-setup.py ${COMPILE_PYTHON} -start-servers: start-servers.py +rpki-start-servers: rpki-start-servers.py ${COMPILE_PYTHON} irbe_cli: irbe_cli.py diff --git a/rpkid/irbe_cli.usage b/rpkid/irbe_cli.usage deleted file mode 100644 index 91b3df8d..00000000 --- a/rpkid/irbe_cli.usage +++ /dev/null @@ -1,63 +0,0 @@ - Command line IR back-end control program for rpkid and pubd. - - $Id: irbe_cli.py 2799 2009-09-30 02:33:36Z sra $ - - Copyright (C) 2009 Internet Systems Consortium ("ISC") - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - - Portions copyright (C) 2007--2008 American Registry for Internet Numbers ("ARIN") - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND ARIN DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL ARIN BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - - Usage: - - # Top-level options: - --config= --help --pem_out= --quiet --verbose - - # left-right protocol: - parent --action= --tag= --self_handle= --parent_handle= --bsc_handle= - --repository_handle= --peer_contact_uri= --sia_base= - --sender_name= --recipient_name= --bpki_cms_cert= --bpki_cms_glue= - --bpki_https_cert= --bpki_https_glue= --rekey --reissue --revoke - --revoke_forgotten - repository --action= --tag= --self_handle= --repository_handle= - --bsc_handle= --peer_contact_uri= --bpki_cert= --bpki_glue= - self --action= --tag= --self_handle= --crl_interval= --regen_margin= - --bpki_cert= --bpki_glue= --rekey --reissue --revoke --run_now - --publish_world_now --revoke_forgotten - child --action= --tag= --self_handle= --child_handle= --bsc_handle= - --bpki_cert= --bpki_glue= --reissue - list_published_objects --self_handle= --tag= - bsc --action= --tag= --self_handle= --bsc_handle= --key_type= - --hash_alg= --key_length= --signing_cert= --signing_cert_crl= - --generate_keypair - - # publication protocol: - certificate --action= --tag= --client_handle= --uri= - roa --action= --tag= --client_handle= --uri= - manifest --action= --tag= --client_handle= --uri= - client --action= --tag= --client_handle= --base_uri= --bpki_cert= - --bpki_glue= - config --action= --tag= --bpki_crl= - crl --action= --tag= --client_handle= --uri= diff --git a/rpkid/backup-sql.py b/rpkid/rpki-sql-backup.py index 0a7c9594..0a7c9594 100644 --- a/rpkid/backup-sql.py +++ b/rpkid/rpki-sql-backup.py diff --git a/rpkid/sql-setup.py b/rpkid/rpki-sql-setup.py index 360b76a9..360b76a9 100644 --- a/rpkid/sql-setup.py +++ b/rpkid/rpki-sql-setup.py diff --git a/rpkid/start-servers.py b/rpkid/rpki-start-servers.py index 1d7862df..1d7862df 100644 --- a/rpkid/start-servers.py +++ b/rpkid/rpki-start-servers.py diff --git a/rpkid/rpki/__doc__.py.in b/rpkid/rpki/__doc__.py.in index 9576acd7..c46617fc 100644 --- a/rpkid/rpki/__doc__.py.in +++ b/rpkid/rpki/__doc__.py.in @@ -703,14 +703,14 @@ # # Before you can (usefully) start any of the daemons, you will need to # set up the MySQL databases they use. You can do this by hand, or -# you can use the @c sql-setup.py script, which prompts you for your +# you can use the @c rpki-sql-setup.py script, which prompts you for your # MySQL root password then attempts to do everything else # automatically using values from rpki.conf. # # Using the script is simple: # # @verbatim -# $ python sql-setup.py +# $ python rpki-sql-setup.py # Please enter your MySQL root password: # @endverbatim # @@ -1028,7 +1028,7 @@ # other purposes. See the rsync(1) and rsyncd.conf(5) manual # pages for more details. # -# @li Start the daemons. You can use $top/rpkid/start-servers.py to +# @li Start the daemons. You can use $top/rpkid/rpki-start-servers.py to # do this, or write your own script. If you intend to run pubd, # you should make sure that the directory you specified as # publication_base_directory exists and is writable by the userid diff --git a/rpkid/setup.py b/rpkid/setup.py index 2e2a3b87..9f5082ef 100644 --- a/rpkid/setup.py +++ b/rpkid/setup.py @@ -23,6 +23,8 @@ import os 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() # Non-standard extension build specification: we need to force # whatever build options our top-level ./configure selected, and we @@ -41,6 +43,5 @@ setup(name = "rpkitoolkit", license = "BSD", url = "http://www.rpki.net/", packages = ["rpki", "rpki.POW"], - ext_modules = [pow]) - -# Probably add other stuff here: scripts, data files, and so forth. + ext_modules = [pow], + data_files = [(ac_sbindir, ac_scripts)]) |