changes to fix some issues when building fpm packages
This commit is contained in:
parent
5b1c9a6e68
commit
8b4f8c2c5b
3 changed files with 11 additions and 6 deletions
13
Makefile.am
13
Makefile.am
|
@ -46,9 +46,11 @@ MAINTAINERCLEANFILES = .version \
|
||||||
|
|
||||||
|
|
||||||
if PYTHON3
|
if PYTHON3
|
||||||
PYTHON_DEP = python3 >= 3.0
|
PYTHON_DEB_DEP = python3 >= 3.0
|
||||||
|
PYTHON_RPM_DEP = python3 >= 3.0
|
||||||
else
|
else
|
||||||
PYTHON_DEP = python >= 2.7, python < 3.0
|
PYTHON_DEB_DEP = python (>= 2.7), python (<< 3.0)
|
||||||
|
PYTHON_RPM_DEP = python >= 2.7, python < 3.0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
define fpm-rpm =
|
define fpm-rpm =
|
||||||
|
@ -61,6 +63,7 @@ fpm -s dir -t rpm -n core \
|
||||||
-p core_$(PYTHON)_VERSION_ARCH.rpm \
|
-p core_$(PYTHON)_VERSION_ARCH.rpm \
|
||||||
-v $(PACKAGE_VERSION) \
|
-v $(PACKAGE_VERSION) \
|
||||||
--rpm-init scripts/core-daemon \
|
--rpm-init scripts/core-daemon \
|
||||||
|
--config-files "/etc/core" \
|
||||||
-d "tcl" \
|
-d "tcl" \
|
||||||
-d "tk" \
|
-d "tk" \
|
||||||
-d "procps-ng" \
|
-d "procps-ng" \
|
||||||
|
@ -70,7 +73,7 @@ fpm -s dir -t rpm -n core \
|
||||||
-d "iproute" \
|
-d "iproute" \
|
||||||
-d "libev" \
|
-d "libev" \
|
||||||
-d "net-tools" \
|
-d "net-tools" \
|
||||||
-d "$(PYTHON_DEP)" \
|
-d "$(PYTHON_RPM_DEP)" \
|
||||||
-C $(DESTDIR)
|
-C $(DESTDIR)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -84,6 +87,8 @@ fpm -s dir -t deb -n core \
|
||||||
-p core_$(PYTHON)_VERSION_ARCH.deb \
|
-p core_$(PYTHON)_VERSION_ARCH.deb \
|
||||||
-v $(PACKAGE_VERSION) \
|
-v $(PACKAGE_VERSION) \
|
||||||
--deb-systemd scripts/core-daemon.service \
|
--deb-systemd scripts/core-daemon.service \
|
||||||
|
--deb-no-default-config-files \
|
||||||
|
--config-files "/etc/core" \
|
||||||
-d "tcl" \
|
-d "tcl" \
|
||||||
-d "tk" \
|
-d "tk" \
|
||||||
-d "libtk-img" \
|
-d "libtk-img" \
|
||||||
|
@ -94,7 +99,7 @@ fpm -s dir -t deb -n core \
|
||||||
-d "ebtables" \
|
-d "ebtables" \
|
||||||
-d "iproute2" \
|
-d "iproute2" \
|
||||||
-d "libev4" \
|
-d "libev4" \
|
||||||
-d "$(PYTHON_DEP)" \
|
-d "$(PYTHON_DEB_DEP)" \
|
||||||
-C $(DESTDIR)
|
-C $(DESTDIR)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
NAME=`basename $0`
|
NAME=`basename $0`
|
||||||
PIDFILE="@CORE_STATE_DIR@/run/$NAME.pid"
|
PIDFILE="@CORE_STATE_DIR@/run/$NAME.pid"
|
||||||
LOG="@CORE_STATE_DIR@/log/$NAME.log"
|
LOG="@CORE_STATE_DIR@/log/$NAME.log"
|
||||||
CMD="PYTHONPATH=@pythondir@ @PYTHON@ @bindir@/$NAME"
|
CMD="@bindir@/$NAME"
|
||||||
|
|
||||||
get_pid() {
|
get_pid() {
|
||||||
cat "$PIDFILE"
|
cat "$PIDFILE"
|
||||||
|
|
|
@ -4,7 +4,7 @@ After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=@PYTHON@ @bindir@/core-daemon
|
ExecStart=@bindir@/core-daemon
|
||||||
TasksMax=infinity
|
TasksMax=infinity
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
Loading…
Reference in a new issue