Skip to content

Commit

Permalink
Merge pull request FreeRADIUS#2588 from mattrose/make-rpm
Browse files Browse the repository at this point in the history
add rpm target to Makefile
  • Loading branch information
alandekok authored Apr 2, 2019
2 parents 4dc0e71 + 8e168e7 commit 383391f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ endif
# the debian packages.
#
ifneq "$(MAKECMDGOALS)" "deb"
ifneq "$(MAKECMDGOALS)" "rpm"
ifeq "$(findstring crossbuild,$(MAKECMDGOALS))" ""
$(if $(wildcard Make.inc),,$(error Missing 'Make.inc' Run './configure [options]' and retry))

include Make.inc
endif
endif
endif

MFLAGS += --no-print-directory

Expand Down Expand Up @@ -350,6 +352,17 @@ deb:
fakeroot debian/rules debian/control #clean
fakeroot dpkg-buildpackage -b -uc

.PHONY: rpm

rpmbuild/SOURCES/freeradius-server-$(RADIUSD_VERSION_STRING).tar.bz2: freeradius-server-$(RADIUSD_VERSION_STRING).tar.bz2
@mkdir -p $(addprefix rpmbuild/,SOURCES SPECS BUILD RPMS SRPMS BUILDROOT)
@for file in `awk '/^Source...:/ {print $$2}' redhat/freeradius.spec` ; do cp redhat/$$file rpmbuild/SOURCES/$$file ; done
@cp $< $@

rpm: rpmbuild/SOURCES/freeradius-server-$(RADIUSD_VERSION_STRING).tar.bz2
@rpmbuild --define "_topdir `pwd`/rpmbuild" -bb redhat/freeradius.spec


# Developer checks
.PHONY: warnings
warnings:
Expand Down

0 comments on commit 383391f

Please sign in to comment.