Makefile & disc/spec: include version in installed osc-staging plugin.

This commit is contained in:
Jimmy Berry 2017-07-13 21:17:08 -05:00
parent 0a840434e3
commit db2908816a
2 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,7 @@ pkgdata_SCRIPTS=$(wildcard *.py *.pl *.sh)
pkgdata_SCRIPTS+=bs_mirrorfull findfileconflicts
pkgdata_DATA+=bs_copy osclib $(wildcard *.pm *.testcase)
package_name = openSUSE-release-tools
VERSION = "build-$(shell date +%F)"
all:
@ -17,6 +18,8 @@ install:
for i in osc-*.py osclib; do ln -s $(pkgdatadir)/$$i $(DESTDIR)$(oscplugindir)/$$i; done
for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
install -m 644 systemd/* $(DESTDIR)$(unitdir)
sed -i "s/OSC_STAGING_VERSION = '.*'/OSC_STAGING_VERSION = '$(VERSION)'/" \
$(DESTDIR)$(pkgdatadir)/osc-staging.py
check: test

View File

@ -165,7 +165,7 @@ make check
%endif
%install
%make_install
%make_install VERSION="%{version}"
# TODO Correct makefile to actually install source.
mkdir -p %{buildroot}%{_datadir}/%{source_dir}/%{announcer_filename}