added initial fpm commands for building packages and minor updates to support
This commit is contained in:
parent
58c6d03bc4
commit
59e6b6630a
8 changed files with 87 additions and 55 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -26,3 +26,10 @@ stamp-h1
|
||||||
|
|
||||||
# ignore test coverage files
|
# ignore test coverage files
|
||||||
coverage.xml
|
coverage.xml
|
||||||
|
|
||||||
|
# python files
|
||||||
|
*.egg-info
|
||||||
|
|
||||||
|
# ignore package files
|
||||||
|
*.rpm
|
||||||
|
*.deb
|
||||||
|
|
89
Makefile.am
89
Makefile.am
|
@ -72,30 +72,52 @@ deb:
|
||||||
@echo "First create source archive with: dpkg-source -b core-@CORE_VERSION@"
|
@echo "First create source archive with: dpkg-source -b core-@CORE_VERSION@"
|
||||||
@echo "Then build with: pbuilder-dist precise i386 build core*.dsc"
|
@echo "Then build with: pbuilder-dist precise i386 build core*.dsc"
|
||||||
|
|
||||||
.PHONE: fpm
|
|
||||||
fpm:
|
|
||||||
fpm -s python -t rpm \
|
|
||||||
-m "CORE Developers <core-dev@nrl.navy.mil>" \
|
|
||||||
--vendor "CORE Developers" \
|
|
||||||
daemon/setup.py
|
|
||||||
fpm -s python -t rpm \
|
|
||||||
-m "CORE Developers <core-dev@nrl.navy.mil>" \
|
|
||||||
--vendor "CORE Developers" \
|
|
||||||
daemon/src/setup.py
|
|
||||||
fpm -s python -t rpm \
|
|
||||||
-m "CORE Developers <core-dev@nrl.navy.mil>" \
|
|
||||||
--vendor "CORE Developers" \
|
|
||||||
daemon/ns3/setup.py
|
|
||||||
|
|
||||||
.PHONY: fpm-deb
|
define fpm-python =
|
||||||
fpm-deb:
|
fpm -s python -t $1 \
|
||||||
fpm -s dir -t deb -n core -v $(CORE_VERSION) -C "$DESTDIR" \
|
-m "$(CORE_MAINTAINERS)" \
|
||||||
-p core_VERSION_ARCH.deb \
|
--vendor "$(CORE_VENDOR)" \
|
||||||
--license "BSD 2-clause" \
|
$2
|
||||||
--vendor "CORE Developers" \
|
endef
|
||||||
--description "Emulate virtual networks in a box." \
|
|
||||||
|
define fpm-gui =
|
||||||
|
fpm -s dir -t $1 -n core-gui \
|
||||||
|
-m "$(CORE_MAINTAINERS)" \
|
||||||
|
--license "BSD" \
|
||||||
|
--description "Common Open Research Emulator GUI front-end" \
|
||||||
--url http://www.nrl.navy.mil/itd/ncs/products/core \
|
--url http://www.nrl.navy.mil/itd/ncs/products/core \
|
||||||
-m "CORE Developers <core-dev@nrl.navy.mil>" \
|
--vendor "$(CORE_VENDOR)" \
|
||||||
|
-p core-gui_VERSION_ARCH.$1 \
|
||||||
|
-v $(CORE_VERSION) \
|
||||||
|
-d "bash" \
|
||||||
|
-d "tcl" \
|
||||||
|
-d "tk" \
|
||||||
|
$2 \
|
||||||
|
-C $(DESTDIR)
|
||||||
|
endef
|
||||||
|
|
||||||
|
.PHONY: fpm
|
||||||
|
fpm:
|
||||||
|
rm -f *.deb && rm -f *.rpm
|
||||||
|
$(call fpm-gui,rpm,-d "tkimg")
|
||||||
|
$(call fpm-gui,deb,-d "libtk-img")
|
||||||
|
$(call fpm-python,rpm,daemon/ns3/setup.py)
|
||||||
|
$(call fpm-python,deb,daemon/ns3/setup.py)
|
||||||
|
fpm -s python -t rpm \
|
||||||
|
-m "$(CORE_MAINTAINERS)" \
|
||||||
|
--vendor "$(CORE_VENDOR)" \
|
||||||
|
-d "procps-ng" \
|
||||||
|
-d "bash >= 3.0" \
|
||||||
|
-d "bridge-utils" \
|
||||||
|
-d "ebtables" \
|
||||||
|
-d "iproute" \
|
||||||
|
-d "libev" \
|
||||||
|
-d "net-tools" \
|
||||||
|
-d "python >= 2.7, python < 3.0" \
|
||||||
|
daemon/src/setup.py daemon/setup.py
|
||||||
|
fpm -s python -t deb \
|
||||||
|
-m "$(CORE_MAINTAINERS)" \
|
||||||
|
--vendor "$(CORE_VENDOR)" \
|
||||||
-d "procps" \
|
-d "procps" \
|
||||||
-d "libc6 >= 2.14" \
|
-d "libc6 >= 2.14" \
|
||||||
-d "bash >= 3.0" \
|
-d "bash >= 3.0" \
|
||||||
|
@ -103,26 +125,9 @@ fpm-deb:
|
||||||
-d "ebtables" \
|
-d "ebtables" \
|
||||||
-d "iproute2" \
|
-d "iproute2" \
|
||||||
-d "libev4" \
|
-d "libev4" \
|
||||||
-d "python >= 2.7" \
|
-d "python (>= 2.7), python (<< 3.0)" \
|
||||||
--deb-recommends quagga
|
--deb-recommends quagga \
|
||||||
|
daemon/src/setup.py daemon/setup.py
|
||||||
|
|
||||||
.PHONY: fpm-rpm
|
|
||||||
fpm-rpm:
|
|
||||||
fpm -s dir -t rpm -n core -v $(CORE_VERSION) -C "$DESTDIR" \
|
|
||||||
-p core_VERSION_ARCH.rpm \
|
|
||||||
--license "BSD 2-clause" \
|
|
||||||
--vendor "CORE Developers" \
|
|
||||||
--description "Emulate virtual networks in a box." \
|
|
||||||
--url http://www.nrl.navy.mil/itd/ncs/products/core \
|
|
||||||
-m "CORE Developers <core-dev@nrl.navy.mil>" \
|
|
||||||
-d "procps" \
|
|
||||||
-d "bash >= 3.0" \
|
|
||||||
-d "bridge-utils" \
|
|
||||||
-d "ebtables" \
|
|
||||||
-d "iproute" \
|
|
||||||
-d "libev" \
|
|
||||||
-d "python >= 2.7"
|
|
||||||
|
|
||||||
.PHONY: core-restart
|
.PHONY: core-restart
|
||||||
core-restart:
|
core-restart:
|
||||||
|
|
|
@ -17,6 +17,8 @@ VERSION=$PACKAGE_VERSION
|
||||||
CORE_VERSION=$PACKAGE_VERSION
|
CORE_VERSION=$PACKAGE_VERSION
|
||||||
CORE_VERSION_DATE=m4_esyscmd_s([./revision.sh -d])
|
CORE_VERSION_DATE=m4_esyscmd_s([./revision.sh -d])
|
||||||
COREDPY_VERSION=$PACKAGE_VERSION
|
COREDPY_VERSION=$PACKAGE_VERSION
|
||||||
|
CORE_MAINTAINERS="CORE Developers <core-dev@nrl.navy.mil>"
|
||||||
|
CORE_VENDOR="CORE Developers"
|
||||||
|
|
||||||
#
|
#
|
||||||
# autoconf and automake initialization
|
# autoconf and automake initialization
|
||||||
|
@ -30,6 +32,8 @@ AM_INIT_AUTOMAKE([tar-ustar])
|
||||||
AC_SUBST(CORE_VERSION)
|
AC_SUBST(CORE_VERSION)
|
||||||
AC_SUBST(CORE_VERSION_DATE)
|
AC_SUBST(CORE_VERSION_DATE)
|
||||||
AC_SUBST(COREDPY_VERSION)
|
AC_SUBST(COREDPY_VERSION)
|
||||||
|
AC_SUBST(CORE_MAINTAINERS)
|
||||||
|
AC_SUBST(CORE_VENDOR)
|
||||||
|
|
||||||
#
|
#
|
||||||
# some of the following directory variables are not expanded at configure-time,
|
# some of the following directory variables are not expanded at configure-time,
|
||||||
|
|
|
@ -4,7 +4,7 @@ CORE_STATE_DIR = "@CORE_STATE_DIR@"
|
||||||
CORE_CONF_DIR = "@CORE_CONF_DIR@"
|
CORE_CONF_DIR = "@CORE_CONF_DIR@"
|
||||||
CORE_DATA_DIR = "@CORE_DATA_DIR@"
|
CORE_DATA_DIR = "@CORE_DATA_DIR@"
|
||||||
CORE_LIB_DIR = "@CORE_LIB_DIR@"
|
CORE_LIB_DIR = "@CORE_LIB_DIR@"
|
||||||
CORE_SBIN_DIR = "@SBINDIR@"
|
CORE_SBIN_DIR = "@BINDIR@"
|
||||||
|
|
||||||
BRCTL_BIN = "@brctl_path@/brctl"
|
BRCTL_BIN = "@brctl_path@/brctl"
|
||||||
SYSCTL_BIN = "@sysctl_path@/sysctl"
|
SYSCTL_BIN = "@sysctl_path@/sysctl"
|
||||||
|
|
|
@ -22,13 +22,29 @@ setup(
|
||||||
],
|
],
|
||||||
install_requires=[
|
install_requires=[
|
||||||
"enum34",
|
"enum34",
|
||||||
"logzero"
|
#"logzero",
|
||||||
],
|
],
|
||||||
tests_require=[
|
tests_require=[
|
||||||
"pytest",
|
"pytest",
|
||||||
"pytest-runner"
|
"pytest-runner",
|
||||||
"pytest-cov",
|
"pytest-cov",
|
||||||
"mock"
|
"mock",
|
||||||
|
],
|
||||||
|
data_files=[
|
||||||
|
("/etc/core", [
|
||||||
|
"data/core.conf",
|
||||||
|
"data/xen.conf",
|
||||||
|
]),
|
||||||
|
("/etc/init.d", [
|
||||||
|
"../scripts/core-daemon",
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
scripts=[
|
||||||
|
"sbin/core-cleanup",
|
||||||
|
"sbin/core-daemon",
|
||||||
|
"sbin/core-manage",
|
||||||
|
"sbin/coresendmsg",
|
||||||
|
"sbin/core-xen-cleanup",
|
||||||
],
|
],
|
||||||
description="Python components of CORE",
|
description="Python components of CORE",
|
||||||
url="http://www.nrl.navy.mil/itd/ncs/products/core",
|
url="http://www.nrl.navy.mil/itd/ncs/products/core",
|
||||||
|
|
|
@ -34,7 +34,7 @@ netns_SOURCES = ${SRC_NETNS}
|
||||||
noinst_LIBRARIES = libnetns.a
|
noinst_LIBRARIES = libnetns.a
|
||||||
libnetns_a_SOURCES = netnsmodule.c vcmdmodule.c
|
libnetns_a_SOURCES = netnsmodule.c vcmdmodule.c
|
||||||
libnetns.a:
|
libnetns.a:
|
||||||
SBINDIR=@SBINDIR@ LDFLAGS="$(LDFLAGS) @libev_LIBS@" CFLAGS="$(CFLAGS) @libev_CFLAGS@" $(PYTHON) setup.py build
|
SBINDIR=@SBINDIR@ LDFLAGS="$(LDFLAGS) @libev_LIBS@" CFLAGS="$(CFLAGS) @libev_CFLAGS@" $(PYTHON) setup.py build_ext
|
||||||
|
|
||||||
# Python libraries install
|
# Python libraries install
|
||||||
install-exec-local:
|
install-exec-local:
|
||||||
|
|
|
@ -29,6 +29,7 @@ setup(
|
||||||
name="core-netns",
|
name="core-netns",
|
||||||
version="1.0",
|
version="1.0",
|
||||||
description="Extension modules to support virtual nodes using Linux network namespaces",
|
description="Extension modules to support virtual nodes using Linux network namespaces",
|
||||||
|
scripts=["vcmd", "vnoded", "netns"],
|
||||||
ext_modules=[
|
ext_modules=[
|
||||||
netns,
|
netns,
|
||||||
vcmd
|
vcmd
|
||||||
|
|
|
@ -59,7 +59,6 @@ dist_coreaddons_DATA = $(ADDONS_FILES)
|
||||||
coreconfigsdir = $(datadir)/core/examples/configs
|
coreconfigsdir = $(datadir)/core/examples/configs
|
||||||
dist_coreconfigs_DATA = $(CONFIG_FILES)
|
dist_coreconfigs_DATA = $(CONFIG_FILES)
|
||||||
|
|
||||||
|
|
||||||
dist-hook:
|
dist-hook:
|
||||||
rm -rf $(distdir)/addons/.svn
|
rm -rf $(distdir)/addons/.svn
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue