Skip to content

Commit 68f8524

Browse files
Stew Benedictmwichmann
Stew Benedict
authored andcommitted
Rework Makefile/spec so src.rpms do not need to use --define (bug 2499)
1 parent 6dcbbcb commit 68f8524

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

scripts/package/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# VERSION, RELEASE and LSB_VERSION get used by the spec file
44
PACKAGE=lsb-appchk-perl
55
VERSION=4.0.1
6-
RELEASE=1
6+
RELEASE=2
77
# default version we will test against - change as needed
88
LSB_VERSION=4.0
99

@@ -70,13 +70,17 @@ all: rpm_package
7070
endif
7171

7272
clean:
73-
@rm -f *.rpm *.deb *.tar.gz *perldeps.pl
73+
@rm -f *.rpm *.deb *.tar.gz *perldeps.pl $(PACKAGE).spec
7474

7575
gensrc:
7676
mysql $(DBOPTS) $$LSBDB < get_perl_modules.sql > $(MODULE_LIST)
7777

7878
tarball: $(MODULE_LIST) $(SOURCE1) $(SOURCE2)
7979

80+
# Specfile generation rule
81+
%.spec : %.spec.sed
82+
sed -e "s#@VERSION@#`echo $(VERSION)`#" -e "s#@RELEASE@#`echo $(RELEASE)`#" < $< > $@
83+
8084
deb_package: rpm_package
8185
@fakeroot alien -cdk $(RPM_BINARY_NAME)
8286

scripts/package/lsb-appchk-perl.spec renamed to scripts/package/lsb-appchk-perl.spec.sed

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
# %{ver}, %{rel} are provided by the Makefile
2+
%define ver @VERSION@
3+
%define rel @RELEASE@
14
%define basedir /opt/lsb
2-
# %{version}, %{rel} are provided by the Makefile
5+
36
Summary: LSB Perl Application Checker
47
Name: lsb-appchk-perl
5-
Version: %{version}
8+
Version: %{ver}
69
Release: %{rel}
710
License: GPL
811
Group: Development/Tools
@@ -13,7 +16,6 @@ Source3: lsb-perl-modules.list
1316
Patch0: perldeps-patch-for-lsb.patch
1417
Patch1: perldeps-bug-2006.patch
1518
URL: http://www.linuxbase.org/test
16-
#Prefix: %{_prefix}
1719
BuildRoot: %{_tmppath}/%{name}-root
1820
AutoReqProv: no
1921
BuildArch: noarch

0 commit comments

Comments
 (0)