mirror of
https://github.com/limosek/zaf.git
synced 2024-11-24 11:29:06 +01:00
package for archlinux
This commit is contained in:
parent
f9584ff673
commit
c2316d2341
17
Makefile
17
Makefile
@ -5,6 +5,7 @@ ZAF_EXPORT_OPTS=$(foreach o,$(ZAF_OPTIONS),$(shell echo $(o)|cut -d '=' -f 1))
|
|||||||
DEBIAN_DIR=tmp/deb
|
DEBIAN_DIR=tmp/deb
|
||||||
DEBIAN_CTRL=$(DEBIAN_DIR)/DEBIAN
|
DEBIAN_CTRL=$(DEBIAN_DIR)/DEBIAN
|
||||||
DEBIAN_PKG=$(shell . lib/zaf.lib.sh; echo out/zaf-$$ZAF_VERSION.deb)
|
DEBIAN_PKG=$(shell . lib/zaf.lib.sh; echo out/zaf-$$ZAF_VERSION.deb)
|
||||||
|
ARCH_DIR=archlinux
|
||||||
ifeq ($(ZAF_DEBUG),)
|
ifeq ($(ZAF_DEBUG),)
|
||||||
ZAF_DEBUG=0
|
ZAF_DEBUG=0
|
||||||
endif
|
endif
|
||||||
@ -24,9 +25,14 @@ help:
|
|||||||
@echo IPLUGINS will be downloaded and installed after package is installed. Can be name or url accessible after package installation.
|
@echo IPLUGINS will be downloaded and installed after package is installed. Can be name or url accessible after package installation.
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
deb: $(DEBIAN_PKG)
|
deb:
|
||||||
|
$(DEBIAN_PKG)
|
||||||
|
|
||||||
$(DEBIAN_PKG): deb-clean deb-init deb-deps deb-control deb-scripts deb-cp deb-package
|
arch:
|
||||||
|
$(ARCH_PKG)
|
||||||
|
|
||||||
|
$(DEBIAN_PKG): deb-clean deb-init deb-deps deb-control deb-scripts deb-cp deb-package
|
||||||
|
$(ARCH_PKG): arch-clean arch-build
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rf tmp/* out/*
|
@rm -rf tmp/* out/*
|
||||||
@ -88,4 +94,9 @@ deb-package:
|
|||||||
@echo PLUGINS in postinst: $(IPLUGINS)
|
@echo PLUGINS in postinst: $(IPLUGINS)
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
|
arch-clean:
|
||||||
|
@cd $(ARCH_DIR)
|
||||||
|
git clean -ffdx
|
||||||
|
|
||||||
|
arch-build:
|
||||||
|
@cd $(ARCH_DIR) && makepkg -f
|
||||||
|
38
archlinux/PKGBUILD
Normal file
38
archlinux/PKGBUILD
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
pkgname="zaf-git"
|
||||||
|
pkgver=${PKGVER:-autogenerated}
|
||||||
|
pkgrel=${PKGREL:-1}
|
||||||
|
pkgdesc="zabbix agent framework - a cli tool for zabbix"
|
||||||
|
arch=("i686" "x86_64")
|
||||||
|
license=("GPL")
|
||||||
|
depends=(
|
||||||
|
"lsb-release"
|
||||||
|
"git"
|
||||||
|
)
|
||||||
|
backup=(
|
||||||
|
"etc/zaf.conf"
|
||||||
|
)
|
||||||
|
source=(
|
||||||
|
"zaf-git::git://github.com/limosek/zaf#branch=master"
|
||||||
|
)
|
||||||
|
md5sums=("SKIP")
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd "$srcdir/$pkgname"
|
||||||
|
local date=$(git log -1 --format="%cd" --date=short | sed s/-//g)
|
||||||
|
local count=$(git rev-list --count HEAD)
|
||||||
|
local commit=$(git rev-parse --short HEAD)
|
||||||
|
echo "$date.${count}_$commit"
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$srcdir/$pkgname"
|
||||||
|
|
||||||
|
:
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$srcdir/$pkgname"
|
||||||
|
|
||||||
|
INSTALL_PREFIX="$pkgdir" \
|
||||||
|
./install.sh auto
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user