Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (34 sloc) 1.08 KB
VERSION=$(shell cat version)
BUILD_NUMBER?=1
RELEASE=$(BUILD_NUMBER)
REVISION=`git --no-pager log --max-count=1 --format=format:%h`
.PHONY: install uninstall clean sudoers spec
install: sudoers
install --mode=755 --directory /etc/yabs
install --mode=644 yabs*.conf /etc/yabs
install --mode=644 repo*.list /etc/yabs
[ -f /etc/yabs/http-auth.conf ] || \
install --mode=440 http-auth.conf /etc/yabs
install --mode=755 yabs-worker.sh /usr/sbin/yabs-worker
install --mode=755 yabs.sh /usr/bin/yabs
install --mode=440 sudoers /etc/sudoers.d/yabs
uninstall:
rm --recursive --force \
/etc/yabs \
/etc/sudoers.d/yabs \
/usr/bin/yabs \
/usr/sbin/yabs-worker
sudoers:
install --mode=755 --directory /etc/sudoers.d
grep --quiet --extended-regexp \
'^#includedir\s+/etc/sudoers.d/?$$' /etc/sudoers || \
echo '#includedir /etc/sudoers.d' >> /etc/sudoers
clean:
find . -name '*~' -delete
rm --force -- strikead-yabs.spec
spec: opensuse.spec.in
cat $< | \
sed "s/{{RELEASE}}/$(RELEASE)/" | \
sed "s/{{VERSION}}/$(VERSION)/" | \
sed "s/{{REVISION}}/$(REVISION)/" \
> strikead-yabs.spec