changes to fix some issues when building fpm packages

This commit is contained in:
bharnden 2019-06-17 19:59:44 -07:00
parent 5b1c9a6e68
commit 8b4f8c2c5b
3 changed files with 11 additions and 6 deletions

View file

@ -46,9 +46,11 @@ MAINTAINERCLEANFILES = .version \
if PYTHON3
PYTHON_DEP = python3 >= 3.0
PYTHON_DEB_DEP = python3 >= 3.0
PYTHON_RPM_DEP = python3 >= 3.0
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
define fpm-rpm =
@ -61,6 +63,7 @@ fpm -s dir -t rpm -n core \
-p core_$(PYTHON)_VERSION_ARCH.rpm \
-v $(PACKAGE_VERSION) \
--rpm-init scripts/core-daemon \
--config-files "/etc/core" \
-d "tcl" \
-d "tk" \
-d "procps-ng" \
@ -70,7 +73,7 @@ fpm -s dir -t rpm -n core \
-d "iproute" \
-d "libev" \
-d "net-tools" \
-d "$(PYTHON_DEP)" \
-d "$(PYTHON_RPM_DEP)" \
-C $(DESTDIR)
endef
@ -84,6 +87,8 @@ fpm -s dir -t deb -n core \
-p core_$(PYTHON)_VERSION_ARCH.deb \
-v $(PACKAGE_VERSION) \
--deb-systemd scripts/core-daemon.service \
--deb-no-default-config-files \
--config-files "/etc/core" \
-d "tcl" \
-d "tk" \
-d "libtk-img" \
@ -94,7 +99,7 @@ fpm -s dir -t deb -n core \
-d "ebtables" \
-d "iproute2" \
-d "libev4" \
-d "$(PYTHON_DEP)" \
-d "$(PYTHON_DEB_DEP)" \
-C $(DESTDIR)
endef

View file

@ -20,7 +20,7 @@
NAME=`basename $0`
PIDFILE="@CORE_STATE_DIR@/run/$NAME.pid"
LOG="@CORE_STATE_DIR@/log/$NAME.log"
CMD="PYTHONPATH=@pythondir@ @PYTHON@ @bindir@/$NAME"
CMD="@bindir@/$NAME"
get_pid() {
cat "$PIDFILE"

View file

@ -4,7 +4,7 @@ After=network.target
[Service]
Type=simple
ExecStart=@PYTHON@ @bindir@/core-daemon
ExecStart=@bindir@/core-daemon
TasksMax=infinity
[Install]