1 # This is make+. Make+ is a set of scripts which enhance GNU make and
2 # let ou build RPMs, and other packages types with just one control
3 # file. Read more at http://www.annexia.org/freeware/makeplus/
5 # The original author is Richard W.M. Jones <rich@annexia.org>.
7 # This software has been explicitly placed in the PUBLIC DOMAIN. You
8 # do not need any sort of license or agreement to use or copy this
9 # software. You may also copyright this software yourself, and/or
10 # relicense it under any terms you want, at any time and at no cost.
11 # This allows you (among other things) to include this software with
12 # other packages so that the user does not need to download and
13 # install make+ separately.
19 @mkdir mp-rpm/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
20 @mkdir mp-rpm/RPMS/{i386,i486,i586,i686,noarch}
21 $(MAKE) -f $(srcdir)/$(_mp_makefile) \
22 MP_SRC_DIST=mp-rpm/SOURCES/$(PACKAGE)-$(VERSION).tar.gz dist
23 @cp mp-rpm.spec mp-rpm/SPECS/$(PACKAGE)-$(VERSION).spec
24 rpmbuild -ba --define _topdir\ `pwd`/mp-rpm --clean \
25 mp-rpm/SPECS/$(PACKAGE)-$(VERSION).spec
26 @mv mp-rpm/RPMS/*/*.rpm mp-rpm/SRPMS/*.rpm .
27 @rm -rf mp-rpm mp-rpm.spec
29 # Build the spec file.
30 mp-rpm.spec: $(srcdir)/$(_mp_makefile)
31 $(MAKE) -f $< prefix=/usr sysconfdir=/etc localstatedir=/var \
32 MP_BIN_MANIFEST=mp-MANIFEST.bin mp_manifest_bin
33 $(MAKEPLUS_HOME)/make_rpm_spec.sh mp-MANIFEST.bin > $@