-
Notifications
You must be signed in to change notification settings - Fork 27
/
Makefile.am
39 lines (32 loc) · 971 Bytes
/
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
# SPDX-License-Identifier: LGPL-3.0-or-later
#
# SPDX-FileCopyrightText: 2020 Western Digital Corporation or its affiliates.
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = lib tools
EXTRA_DIST = autogen.sh \
README.md \
LICENSES/GPL-3.0-or-later.txt \
LICENSES/LGPL-3.0-or-later.txt
if BUILDING_RPM
rpmdir = $(abs_top_builddir)/rpmbuild
EXTRA_DIST += libzbd.spec
RPMARCH=`$(RPM) --eval %_target_cpu`
rpm: dist
@echo "Building RPM packages..."
@mkdir -p $(rpmdir)
$(RPMBUILD) -ta --clean \
-D "_topdir $(rpmdir)" \
-D "pkg_name $(PACKAGE_NAME)" \
-D "pkg_version $(PACKAGE_VERSION)" \
libzbd-$(PACKAGE_VERSION).tar.gz
@mv -f $(rpmdir)/RPMS/$(RPMARCH)/*.rpm $(abs_top_builddir)
@mv -f $(rpmdir)/SRPMS/*.rpm $(abs_top_builddir)
@rm -rf $(rpmdir)
@rm -f libzbd-$(PACKAGE_VERSION).tar.gz
else
rpm:
@echo "Building RPM packages requires rpmbuild and rpm utilities"
exit 1
endif
CLEANFILES = *.rpm *.tar.gz
DISTCLEANFILES = *.rpm *.tar.gz configure