forked from naemon/naemon-vimcrypt-vault-broker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
48 lines (37 loc) · 1.7 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
AM_CFLAGS += $(CFLAGS) $(naemon_CFLAGS)
AM_CPPFLAGS += $(CPPFLAGS)
ACLOCAL_AMFLAGS = -I m4
pkglib_LTLIBRARIES = naemon_vimvault.la
EXTRA_DIST = README.md \
naemon-vimvault.spec \
debian \
version.sh \
vimvault.cfg.in
bin_PROGRAMS =
naemon_vimvault_la_LDFLAGS = -module -avoid-version -shared $(NAEMON_LIBS) -lssl -lcrypto
naemon_vimvault_la_CFLAGS = $(AM_CFLAGS) $(NAEMON_CFLAGS)
naemon_vimvault_la_CPPFLAGS = $(AM_CPPFLAGS)
naemon_vimvault_sources = module.c
naemonconf_DATA = vimvault.cfg
naemon_vimvault_la_SOURCES = $(naemon_vimvault_sources)
CLEANFILES = $(BUILT_SOURCES)
vimvault.cfg : % : %.in
$(AM_V_GEN) sed \
-e 's,@pkglibdir[@],$(pkglibdir),g' \
-e 's,@brokeroptions[@],@brokeroptions@,g' \
$< > $@
rpm: dist
rpmbuild -tb naemon-vimvault-${VERSION}.tar.gz
deb:
debuild -i -us -uc -b
version:
[ -e .git ] || { echo "changing versions only works in git clones!"; exit 1; }
[ `git status | grep -cP 'working (directory|tree) clean'` -eq 1 ] || { echo "git project is not clean, cannot tag version"; exit 1; }
OLDVERSION=$(shell grep ^VERSION version.sh | awk -F = '{ print $$2}'); \
NEWVERSION=$$(dialog --stdout --inputbox "New Version:" 0 0 "$$OLDVERSION"); \
if [ -n "$$NEWVERSION" ] && [ "$$NEWVERSION" != "$$OLDVERSION" ]; then \
sed -ri "s/$$OLDVERSION/$$NEWVERSION/" version.sh naemon-vimvault.spec; \
sed -e 's/UNRELEASED/unstable/g' -i debian/changelog; \
DEBFULLNAME="Naemon Development Team" DEBEMAIL="Naemon Development <naemon-dev@monitoring-lists.org>" dch --newversion "$$NEWVERSION" --package "naemon-vimvault" -D "UNRELEASED" --urgency "low" "new upstream release"; \
sed -e 's/unstable/UNRELEASED/g' -i debian/changelog; \
fi