]> granicus.if.org Git - zfs/blob - config/rpm.am
Range lock performance improvements
[zfs] / config / rpm.am
1 srpm-modules:
2         $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common
3
4 srpm-utils:
5         $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common
6
7 srpm: srpm-modules srpm-utils
8
9 rpm-modules: srpm-modules
10         $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common
11
12 rpm-utils: srpm-utils
13         $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common
14
15 rpm-modules: srpm-modules
16
17 rpm: rpm-modules rpm-utils
18
19 rpm-local:
20         @(if test "${HAVE_RPMBUILD}" = "no"; then \
21                 echo -e "\n" \
22         "*** Required util ${RPMBUILD} missing.  Please install the\n" \
23         "*** package for your distribution which provides ${RPMBUILD},\n" \
24         "*** re-run configure, and try again.\n"; \
25                 exit 1; \
26         fi; \
27         mkdir -p $(rpmbuild)/TMP && \
28         mkdir -p $(rpmbuild)/BUILD && \
29         mkdir -p $(rpmbuild)/RPMS && \
30         mkdir -p $(rpmbuild)/SRPMS && \
31         mkdir -p $(rpmbuild)/SPECS && \
32         cp $(rpmspec) $(rpmbuild)/SPECS && \
33         mkdir -p $(rpmbuild)/SOURCES && \
34         cp $(distdir).tar.gz $(rpmbuild)/SOURCES)
35
36 srpm-common: dist
37         rpmpkg=$(pkg)-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE).src.rpm; \
38         rpmspec=$(pkg).spec; \
39         rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \
40         $(MAKE) $(AM_MAKEFLAGS) \
41                 rpmbuild="$$rpmbuild" \
42                 rpmspec="$$rpmspec" \
43                 rpm-local || exit 1; \
44         $(RPMBUILD) \
45                 --define "_tmppath $$rpmbuild/TMP" \
46                 --define "_topdir $$rpmbuild" \
47                 --define "build_src_rpm 1" \
48                 --define "dist %{nil}" \
49                 --nodeps -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \
50         cp $$rpmbuild/SRPMS/$$rpmpkg . || exit 1; \
51         $(RM) -R $$rpmbuild
52
53 rpm-common: 
54         rpmpkg=$(pkg)-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE).src.rpm; \
55         rpmspec=$(pkg).spec; \
56         rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \
57         $(MAKE) $(AM_MAKEFLAGS) \
58                 rpmbuild="$$rpmbuild" \
59                 rpmspec="$$rpmspec" \
60                 rpm-local || exit 1; \
61         $(RPMBUILD) \
62                 --define "_tmppath $$rpmbuild/TMP" \
63                 --define "_topdir $$rpmbuild" \
64                 --define "dist %{nil}" \
65                 --define "require_kdir $(LINUX)" \
66                 --define "require_kobj $(LINUX_OBJ)" \
67                 --define "require_kver $(LINUX_VERSION)" \
68                 --define "require_spldir $(SPL)" \
69                 --define "require_splobj $(SPL_OBJ)" \
70                 --define "require_splver $(SPL_VERSION)" \
71                 --nodeps --rebuild $$rpmpkg || exit 1; \
72         cp $$rpmbuild/RPMS/*/* . || exit 1; \
73         $(RM) -R $$rpmbuild