Merge pull request #258 from coreemu/fix-fpm

changes to fix some issues when building fpm packages
This commit is contained in:
bharnden 2019-06-17 20:14:19 -07:00 committed by GitHub
commit 17e1b29ebe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 "ethtool" \
-d "tcl" \
-d "tk" \
@ -71,7 +74,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
@ -85,6 +88,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 "ethtool" \
-d "tcl" \
-d "tk" \
@ -96,7 +101,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="@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]