]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
rpm: versioning fixes, added libdvbv5-devel to BuildRequires
authorJaroslav Kysela <perex@perex.cz>
Thu, 21 May 2015 19:03:45 +0000 (21:03 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 21 May 2015 19:34:21 +0000 (21:34 +0200)
rpm/Makefile
rpm/tvheadend.spec.in

index dda9a67a432a032a14024e557eb101f82a29c824..86fa2a24a09a76a878e8415f8387bfda0e509cd4 100644 (file)
@@ -20,10 +20,18 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../.config.mk
 
 COMMIT   ?= $(shell git rev-parse HEAD)
 COMMIT1   = $(shell git rev-parse $(COMMIT))
-VERSION   = $(shell cd .. && git describe --match "v*" $(COMMIT1) | sed -e 's/-/./g' -e 's/^v//g' )
+FVERSION  = $(shell cd .. && git describe --match "v*" $(COMMIT1) | sed "s/^v//")
+VERSION   = $(shell echo "$(FVERSION)" | cut -d '-' -f 1)
+RELEASE   = $(shell echo "$(FVERSION)" | cut -d '-' -f 2-10 | sed "s/-/~/g")
+VERSION  ?= "0.0.0"
+RELEASE  ?= 1
+ifeq ($(VERSION),$(RELEASE))
+RELEASE   = 1
+endif
 
 tvheadend.spec: tvheadend.spec.in
        @sed -e 's/@VERSION@/$(VERSION)/g' \
+            -e 's/@RELEASE@/$(RELEASE)/g' \
             -e 's/@COMMIT@/$(COMMIT1)/g' \
                $< > $@
 
index 46ddc3e461afd5cb7894892ac409a0765157f98e..213d16c856b3e4c1ebd567b7680fa302cf52bb24 100644 (file)
@@ -4,7 +4,7 @@
 Summary:        Tvheadend - a TV streaming server and DVR
 Name:           tvheadend
 Version:        @VERSION@
-Release:        1
+Release:        @RELEASE@
 
 License:        GPLv3
 Group:          Applications/Multimedia
@@ -17,6 +17,7 @@ BuildRequires:  systemd-units >= 1
 BuildRequires:  dbus-devel
 BuildRequires:  avahi-libs
 BuildRequires:  openssl-devel
+BuildRequires:  libdvbv5-devel
 BuildRequires:  git wget python
 
 Requires:       systemd-units >= 1
@@ -31,7 +32,7 @@ to Showtime, XBMC and various other clients.
 #%patch999 -p1 -b .test
 
 %build
-echo %{version} > %{_builddir}/%{buildsubdir}/rpm/version
+echo %{version}-%{release} > %{_builddir}/%{buildsubdir}/rpm/version
 %ifarch %arm
       %configure --disable-lockowner --enable-bundle --disable-libffmpeg_static
 %else
@@ -76,6 +77,10 @@ exit 0
 %{_unitdir}/*
 
 %changelog
+* Thu May 21 2015 Jaroslav Kysela <perex@perex.cz> v4.0.1
+- add libdvbv5-devel to BuildRequires
+- changed versioning system (put changes and git hash to revision)
+
 * Thu May 14 2015 Jaroslav Kysela <perex@perex.cz> v3.9-2842
 - add python to BuildRequires