The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/openzfs/config/rpm.am

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 ###############################################################################
    2 # Copyright (C) 2007-2013 Lawrence Livermore National Security, LLC.
    3 # Copyright (C) 2007 The Regents of the University of California.
    4 # Written by Brian Behlendorf <behlendorf1@llnl.gov>.
    5 ###############################################################################
    6 # Build targets for RPM packages.
    7 ###############################################################################
    8 
    9 PHONY += srpm srpms srpm-kmod srpm-dkms srpm-utils
   10 PHONY += rpm rpms rpm-kmod rpm-dkms rpm-utils rpm-utils-initramfs
   11 PHONY += srpm-common rpm-common rpm-local
   12 
   13 srpm-kmod srpm-dkms srpm-utils: dist
   14 
   15 srpm-kmod:
   16         $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-kmod" \
   17                 def='${SRPM_DEFINE_COMMON} ${SRPM_DEFINE_KMOD}' srpm-common
   18 
   19 srpm-dkms:
   20         $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-dkms" \
   21                 def='${SRPM_DEFINE_COMMON} ${SRPM_DEFINE_DKMS}' srpm-common
   22 
   23 srpm-utils:
   24         $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" \
   25                 def='${SRPM_DEFINE_COMMON} ${SRPM_DEFINE_UTIL}' srpm-common
   26 
   27 srpm: srpm-kmod srpm-dkms srpm-utils
   28 srpms: srpm-kmod srpm-dkms srpm-utils
   29 
   30 rpm-kmod: srpm-kmod
   31         $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-kmod" \
   32                 def='${RPM_DEFINE_COMMON} ${RPM_DEFINE_KMOD}' rpm-common
   33 
   34 rpm-dkms: srpm-dkms
   35         $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-dkms" \
   36                 def='${RPM_DEFINE_COMMON} ${RPM_DEFINE_DKMS}' rpm-common
   37 
   38 # The rpm-utils and rpm-utils-initramfs targets are identical except for the
   39 # zfs-initramfs package: rpm-utils never includes it, rpm-utils-initramfs
   40 # includes it if detected at configure time. The zfs-initramfs package does
   41 # not work on any known RPM-based distribution and the resulting RPM is only
   42 # used to create a Debian package. The rpm-utils-initramfs target is not
   43 # intended to be specified by the user directly, it is provided as a
   44 # dependency of the deb-utils target.
   45 
   46 rpm-utils: srpm-utils
   47         $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" \
   48                 def='${RPM_DEFINE_COMMON} ${RPM_DEFINE_UTIL}' rpm-common
   49 
   50 rpm-utils-initramfs: srpm-utils
   51         $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" \
   52                 def='${RPM_DEFINE_COMMON} ${RPM_DEFINE_UTIL} ${RPM_DEFINE_INITRAMFS}' rpm-common
   53 
   54 rpm: rpm-kmod rpm-dkms rpm-utils
   55 rpms: rpm-kmod rpm-dkms rpm-utils
   56 
   57 rpm-local:
   58         @(if test "${HAVE_RPMBUILD}" = "no"; then \
   59                 echo -e "\n" \
   60         "*** Required util ${RPMBUILD} missing.  Please install the\n" \
   61         "*** package for your distribution which provides ${RPMBUILD},\n" \
   62         "*** re-run configure, and try again.\n"; \
   63                 exit 1; \
   64         fi; \
   65         mkdir -p $(rpmbuild)/TMP && \
   66         mkdir -p $(rpmbuild)/BUILD && \
   67         mkdir -p $(rpmbuild)/RPMS && \
   68         mkdir -p $(rpmbuild)/SRPMS && \
   69         mkdir -p $(rpmbuild)/SPECS && \
   70         cp ${RPM_SPEC_DIR}/$(rpmspec) $(rpmbuild)/SPECS && \
   71         mkdir -p $(rpmbuild)/SOURCES && \
   72         cp $(top_srcdir)/scripts/kmodtool $(rpmbuild)/SOURCES && \
   73         cp $(distdir).tar.gz $(rpmbuild)/SOURCES)
   74 
   75 srpm-common:
   76         @(dist=`$(RPM) --eval %{?dist}`; \
   77         rpmpkg=$(pkg)-$(VERSION)-$(RELEASE)$$dist*src.rpm; \
   78         rpmspec=$(pkg).spec; \
   79         rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \
   80         $(MAKE) $(AM_MAKEFLAGS) \
   81                 rpmbuild="$$rpmbuild" \
   82                 rpmspec="$$rpmspec" \
   83                 rpm-local || exit 1; \
   84         LANG=C $(RPMBUILD) \
   85                 --define "_tmppath $$rpmbuild/TMP" \
   86                 --define "_topdir $$rpmbuild" \
   87                 $(def) -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \
   88         cp $$rpmbuild/SRPMS/$$rpmpkg . || exit 1; \
   89         rm -R $$rpmbuild)
   90 
   91 rpm-common: 
   92         @(dist=`$(RPM) --eval %{?dist}`; \
   93         rpmpkg=$(pkg)-$(VERSION)-$(RELEASE)$$dist*src.rpm; \
   94         rpmspec=$(pkg).spec; \
   95         rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \
   96         $(MAKE) $(AM_MAKEFLAGS) \
   97                 rpmbuild="$$rpmbuild" \
   98                 rpmspec="$$rpmspec" \
   99                 rpm-local || exit 1; \
  100         LANG=C ${RPMBUILD} \
  101                 --define "_tmppath $$rpmbuild/TMP" \
  102                 --define "_topdir $$rpmbuild" \
  103                 $(def) --rebuild $$rpmpkg || exit 1; \
  104         cp $$rpmbuild/RPMS/*/* . || exit 1; \
  105         rm -R $$rpmbuild)

Cache object: ef786c936836c09dd4ed9b3c16d851b3


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.