Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add basic RPM build support
- Loading branch information
Showing
5 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # | ||
| # RPM build | ||
| # Copyright (C) 2014 Jaroslav Kysela | ||
| # | ||
| # This program is free software: you can redistribute it and/or modify | ||
| # it under the terms of the GNU General Public License as published by | ||
| # the Free Software Foundation, either version 3 of the License, or | ||
| # (at your option) any later version. | ||
| # | ||
| # This program is distributed in the hope that it will be useful, | ||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| # GNU General Public License for more details. | ||
| # | ||
| # You should have received a copy of the GNU General Public License | ||
| # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| # | ||
|
|
||
| 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 's/-/./g' ) | ||
|
|
||
| tvheadend.spec: tvheadend.spec.in | ||
| @sed -e 's/@VERSION@/$(VERSION)/g' \ | ||
| -e 's/@COMMIT@/$(COMMIT1)/g' \ | ||
| $< > $@ | ||
|
|
||
| build: tvheadend.spec | ||
| spectool --get-files --sourcedir tvheadend.spec | ||
| rpmbuild -ba tvheadend.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| [Unit] | ||
| Description=Tvheadend - a TV streaming server and DVR | ||
| After=syslog.target network.target auditd.service | ||
|
|
||
| [Service] | ||
| EnvironmentFile=/etc/sysconfig/tvheadend | ||
| ExecStart=/usr/bin/tvheadend -f -p /var/run/tvheadend.pid -u $OPTIONS | ||
| PIDFile=/var/run/tvheadend.pid | ||
| Type=forking | ||
| Restart=on-failure | ||
| RestartSec=54s | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| %global commit @COMMIT@ | ||
| %global shortcommit %(c=%{commit}; echo ${c:0:7}) | ||
|
|
||
| Summary: Tvheadend - a TV streaming server and DVR | ||
| Name: tvheadend | ||
| Version: @VERSION@ | ||
| Release: 1 | ||
|
|
||
| License: GPLv3 | ||
| Group: Applications/Multimedia | ||
| URL: http://tvheadend.org | ||
|
|
||
| Source: https://github.com/tvheadend/tvheadend/archive/%{commit}/tvheadend-%{commit}.tar.gz | ||
| #Patch999: test.patch | ||
|
|
||
| BuildRequires: systemd-units >= 1 | ||
| BuildRequires: dbus-devel | ||
| BuildRequires: avahi-libs | ||
| BuildRequires: openssl-devel | ||
| BuildRequires: git wget | ||
|
|
||
| Requires: systemd-units >= 1 | ||
|
|
||
| %description | ||
| Tvheadend is a TV streaming server with DVR for Linux supporting | ||
| DVB, ATSC, IPTV, SAT>IP as input sources. Can be used as a backend | ||
| to Showtime, XBMC and various other clients. | ||
|
|
||
| %prep | ||
| %setup -q -n tvheadend-%{commit} | ||
| #%patch999 -p1 -b .test | ||
|
|
||
| %build | ||
| %configure --disable-lockowner --enable-bundle --enable-libffmpeg_static | ||
| %{__make} | ||
|
|
||
| %install | ||
| # binary | ||
| mkdir -p -m755 %{buildroot}%{_bindir} | ||
| install -p -m 755 build.linux/tvheadend %{buildroot}%{_bindir} | ||
| # systemd | ||
| mkdir -p -m755 %{buildroot}%{_sysconfdir}/sysconfig | ||
| install -p -m 644 rpm/tvheadend.sysconfig %{buildroot}%{_sysconfdir}/sysconfig | ||
| mkdir -p -m755 %{buildroot}%{_unitdir} | ||
| install -p -m 644 rpm/tvheadend.service %{buildroot}%{_unitdir} | ||
|
|
||
| %files | ||
| %{_bindir}/* | ||
| %{_sysconfdir}/sysconfig/* | ||
| %{_unitdir}/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Configuration file for the tvheadend service. | ||
|
|
||
| OPTIONS="-u tvheadend -g tvheadend -6 --http_port=9981 --htsp_port=9982" |