Merge branch 'master' of https://code.brandmeister.network/r3abm/CronosAgent
This commit is contained in:
commit
edabcb60cc
3 changed files with 38 additions and 13 deletions
|
@ -1,13 +1,21 @@
|
||||||
before_script:
|
debian_amd64:
|
||||||
- sudo apt-get update -qq && sudo apt-get install -y -qq build-essential dpkg-dev libssl-dev debhelper
|
|
||||||
stages:
|
|
||||||
- build
|
|
||||||
|
|
||||||
|
|
||||||
debian_386_amd64:
|
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- make debian-package
|
- make debian-package
|
||||||
|
- cp ../cronos*.deb .
|
||||||
|
- rm ../cronos*
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- cronos*.deb
|
||||||
|
tags:
|
||||||
|
- debian
|
||||||
|
- amd64
|
||||||
|
|
||||||
|
debian_386:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
- ARCH=i386 make debian-package
|
- ARCH=i386 make debian-package
|
||||||
- cp ../cronos*.deb .
|
- cp ../cronos*.deb .
|
||||||
- rm ../cronos*
|
- rm ../cronos*
|
||||||
|
@ -19,4 +27,18 @@ debian_386_amd64:
|
||||||
tags:
|
tags:
|
||||||
- debian
|
- debian
|
||||||
- i386
|
- i386
|
||||||
- amd64
|
|
||||||
|
debian_armhf:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- make debian-package
|
||||||
|
- cp ../cronos*.deb .
|
||||||
|
- rm ../cronos*
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- cronos*.deb
|
||||||
|
tags:
|
||||||
|
- debian
|
||||||
|
- armv6
|
5
Makefile
5
Makefile
|
@ -7,10 +7,11 @@ PREFIX = $(DESTDIR)/opt/CronosAgent
|
||||||
|
|
||||||
ifeq ($(OS), Linux)
|
ifeq ($(OS), Linux)
|
||||||
FLAGS += -rdynamic
|
FLAGS += -rdynamic
|
||||||
KIND := $(shell grep -E "^6.0" /etc/debian_version > /dev/null ; echo $?)
|
ifeq ($(shell lsb_release -i -s), Debian)
|
||||||
ifneq ($(KIND), 0)
|
ifeq ($(shell grep -E "^6.0" /etc/debian_version > /dev/null ; echo $?), 0)
|
||||||
LIBRARIES += rt
|
LIBRARIES += rt
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
ifeq ($(USE_OPENSSL), yes)
|
ifeq ($(USE_OPENSSL), yes)
|
||||||
FLAGS += -DUSE_OPENSSL
|
FLAGS += -DUSE_OPENSSL
|
||||||
DEPENDENCIES += openssl
|
DEPENDENCIES += openssl
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
X_DOLLAR:=$$
|
||||||
|
X_SOURCE_DIR:=$(CURDIR)/source
|
||||||
|
|
||||||
PKG_NAME:=cronosagent
|
PKG_NAME:=cronosagent
|
||||||
PKG_VERSION:=$(shell grep -o -E '[0-9]+' $(CURDIR)/source/Version.h)
|
PKG_VERSION:=$(shell grep -o -E '[0-9]+' $(CURDIR)/source/Version.h)
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_BUILD_DEPENDS:=
|
PKG_BUILD_DEPENDS:=
|
||||||
X_SOURCE_DIR:=$(CURDIR)/source
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
@ -52,10 +54,10 @@ define Package/cronosagent/postinst
|
||||||
/etc/init.d/cronosagent start
|
/etc/init.d/cronosagent start
|
||||||
|
|
||||||
grep cronosagent /etc/crontabs/root > /dev/null
|
grep cronosagent /etc/crontabs/root > /dev/null
|
||||||
if [ "$?" -eq "1" ]
|
if [ "$(X_DOLLAR)?" -eq "1" ]
|
||||||
then
|
then
|
||||||
cat << EOF >> /etc/crontabs/root
|
cat << EOF >> /etc/crontabs/root
|
||||||
*/10 * * * * test -n "$(ls /etc/rc.d/S??cronosagent)" -a -z "$(pidof cronosagent)" && /etc/init.d/cronosagent start
|
*/10 * * * * test -n "$(X_DOLLAR)(ls /etc/rc.d/S??cronosagent)" -a -z "$(X_DOLLAR)(pidof cronosagent)" && /etc/init.d/cronosagent start
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue