-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
45 lines (40 loc) · 1.65 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
# vi: noexpandtab softtabstop=0
## Process this file with automake to produce Makefile.in
EXTRA_DIST = FAQ README COPYING AUTHORS INSTALL NEWS ChangeLog \
backupninja.spec backupninja.spec.in autogen.sh
SUBDIRS = etc examples handlers lib man src
local_rpm_topdir=`cd $(top_srcdir) && pwd`/rpm
rpm-package: dist
if test x$(HAVE_RPM) = xyes ; then \
mkdir -p $(local_rpm_topdir) ; \
cd $(local_rpm_topdir) ; \
mkdir -p BUILD RPMS SOURCES SPECS ; \
cd SOURCES ; \
$(LN_S) ../../$(distdir).tar.gz ; \
cd .. ; \
cd SPECS ; \
$(LN_S) ../../backupninja.spec . ; \
cd .. ; \
rpmbuild --define "_topdir `cd . && pwd`" -bb SPECS/backupninja.spec && \
echo "Package successfully built in `pwd`/RPMS." ; \
else \
echo "Error: RPM executable and/or source directory not found." ; \
fi
srpm-package: dist
if test x$(HAVE_RPM) = xyes ; then \
mkdir -p $(local_rpm_topdir) ; \
cd $(local_rpm_topdir) ; \
mkdir -p BUILD SRPMS SOURCES SPECS ; \
cd SOURCES ; \
$(LN_S) ../../$(distdir).tar.gz ; \
cd .. ; \
cd SPECS ; \
$(LN_S) ../../backupninja.spec . \
cd .. ; \
rpmbuild --define "_topdir `cd . && pwd`" -bs SPECS/backupninja.spec && \
echo "Package successfully built in `pwd`/SRPMS." ; \
else \
echo "Error: RPM executable and/or source directory not found." ; \
fi
clean-local:
-rm -rf $(local_rpm_topdir)