Skip to content

Commit 39019c3

Browse files
yoshfujiDavid Heidelberger
authored and
David Heidelberger
committed
make,spec: Add rpm target.
Signed-off-by: YOSHIFUJI Hideaki <[email protected]> Conflicts: iputils.spec
1 parent 3987eba commit 39019c3

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.rpmtmp/.placeholder

Whitespace-only changes.

Makefile

+7
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ distclean: clean
234234
fi
235235

236236
# -------------------------------------
237+
RPMBUILD=rpmbuild
238+
RPMTMP=.rpmtmp
237239
snapshot:
238240
@echo "[$(TAG)]" > RELNOTES.NEW
239241
@echo >>RELNOTES.NEW
@@ -250,3 +252,8 @@ snapshot:
250252
@git tag -s -m "iputils-$(TAG)" $(TAG)
251253
@git archive --format=tar --prefix=iputils-$(TAG)/ $(TAG) | bzip2 -9 > ../iputils-$(TAG).tar.bz2
252254

255+
rpm:
256+
@git archive --format=tar --prefix=iputils/ HEAD | bzip2 -9 > $(RPMTMP)/iputils.tar.bz2
257+
@$(RPMBUILD) -ta --define 'current yes' $(RPMTMP)/iputils.tar.bz2
258+
@rm -f $(RPMTMP)/iputils.tar.bz2
259+

iputils.spec

+5-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
#
44

55
%define ssdate 20140519
6+
%define srcbase iputils%{!?current:-s%{ssdate}}
7+
68
Summary: The ping program for checking to see if network hosts are alive.
79
Name: iputils
8-
Version: s%{ssdate}
10+
Version: %{ssdate}%{?current:+}
911
Release: 1local
1012
License: GPLv2+
1113
Group: System Environment/Daemons
12-
Source0: iputils-s%{ssdate}.tar.bz2
14+
Source0: %{srcbase}.tar.bz2
1315
Prefix: %{_prefix}
1416
BuildRoot: %{_tmppath}/%{name}-root
1517
#BuildPrereq: docbook-dtd31-sgml, perl
@@ -22,7 +24,7 @@ specified network host and can tell you if that machine is alive and
2224
receiving network traffic.
2325

2426
%prep
25-
%setup -q %{name}
27+
%setup -q -n %{srcbase}
2628

2729
%build
2830
make

0 commit comments

Comments
 (0)