Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 613493 Details for
Bug 857751
add conditionals to be able to build with systemd or sysvinit support whereever applicable
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
example spec patch
mediatomb.patch (text/plain), 5.30 KB, created by
David Jaša
on 2012-09-16 18:57:50 UTC
(
hide
)
Description:
example spec patch
Filename:
MIME Type:
Creator:
David Jaša
Created:
2012-09-16 18:57:50 UTC
Size:
5.30 KB
patch
obsolete
>--- mediatomb.spec 2012-07-20 23:28:29.000000000 +0200 >+++ mediatomb.spec 2012-09-16 20:36:43.096479095 +0200 >@@ -1,7 +1,19 @@ >+%global with_sysvinit 0 >+%global with_systemd 0 >+%global rhel6 0 >+ >+%if 0%{?rhel} > 0 && 0%{?rhel} <= 6 >+%global with_sysvinit 1 >+%global rhel6 1 >+%endif >+%if 0%{?rhel} == 0 || 0%{?rhel} >= 7 >+%global with_systemd 1 >+%endif >+ > Version: 0.12.1 > Summary: UPnP AV MediaServer > Name: mediatomb >-Release: 17%{?dist} >+Release: 19%{?dist} > Summary: MediaTomb - UPnP AV Mediaserver for Linux > License: GPLv2 > Group: Applications/Multimedia >@@ -27,29 +39,28 @@ > Patch8: mediatomb-0.12.1.fixyoutube.patch > # Fix for gcc 4.7 build errors > Patch9: mediatomb-0.12.1.gcc47.patch >+# Add subtitles support: http://sourceforge.net/tracker/?func=detail&aid=3014026&group_id=129766&atid=715782 >+Patch10: mediatomb-0.12.1-samsung_video_subtitles.patch > > Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) > BuildRequires: automake >-BuildRequires: sqlite-devel, mysql-devel, libexif-devel, id3lib-devel, file-devel, js-devel, zlib-devel, taglib-devel flac-devel >+BuildRequires: sqlite-devel, mysql-devel, libexif-devel, id3lib-devel, file-devel, js-devel, zlib-devel, taglib-devel, flac-devel > BuildRequires: expat-devel, libcurl-devel > BuildRequires: libmp4v2-devel > BuildRequires: lastfmlib-devel >-%if 0%{?fedora} >= 13 >-%else >-%if 0%{?fedora} >= 9 > BuildRequires: xulrunner-devel >-%else >-BuildRequires: firefox-devel >-%endif >-%endif > Requires: mysql-libs, expat > Requires(pre): shadow-utils >-#Requires(post): /sbin/chkconfig >-#Requires(preun): /sbin/chkconfig >-#Requires(preun): /sbin/service >+%if %{with_sysvinit} >+Requires(post): /sbin/chkconfig >+Requires(preun): /sbin/chkconfig >+Requires(preun): /sbin/service >+%endif >+%if %{with_systemd} > Requires(post): systemd-units > Requires(preun): systemd-units > Requires(postun): systemd-units >+%endif > > %description > MediaTomb is an open source (GPL) UPnP MediaServer with a nice web user >@@ -64,42 +75,37 @@ > %patch0 -p0 > %patch1 -p0 > %patch2 -p0 >+# these two and patch9 fail the build on RHEL6 >+%if ! %{rhel6} > %patch3 -p1 > %patch4 -p1 >+%endif > %patch5 -p0 > %patch6 -p0 > %patch7 -p1 > %patch8 -p3 >+%if ! %{rhel6} > %patch9 -p0 >+%endif >+%patch10 -p0 > > %build > # Patches affect configure.ac scripts, need to autoreconf > autoreconf > >-# Fedora 13 on use system jsapi.h >-%if 0%{?fedora} >= 13 > %configure --enable-inotify --enable-taglib --enable-libjs --enable-FLAC >-%else >-# Fedora 11 and 12 use xulrunner 1.9.1 for jsapi.h >-%if 0%{?fedora} >= 11 >-%configure --enable-inotify --enable-taglib --enable-libjs --with-js-h=%{_includedir}/xulrunner-sdk-1.9.1/js >-%else >-# Fedora 10 uses xulrunner 1.9 for jsapi.h >-%if 0%{?fedora} = 10 >-%configure --enable-inotify --enable-taglib --enable-libjs --with-js-h=%{_includedir}/xulrunner-sdk-1.9/js >-# Fedora 9 and below use system libjs >-%else >-%configure --enable-inotify --enable-taglib --enable-libjs >-%endif >-%endif >-%endif > %{__make} %{?_smp_mflags} > > > %install > %{__rm} -rf $RPM_BUILD_ROOT > >+%if %{with_sysvinit} >+%{__install} -p -D -m0755 scripts/mediatomb-service-fedora $RPM_BUILD_ROOT%{_initrddir}/mediatomb >+%endif >+%if %{with_systemd} > %{__install} -p -D -m0755 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/mediatomb.service >+%endif > %{__install} -p -D -m0644 config/mediatomb-conf-fedora $RPM_BUILD_ROOT%{_sysconfdir}/mediatomb.conf > make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" > >@@ -129,32 +135,44 @@ > exit 0 > > %post >-#/sbin/chkconfig --add mediatomb >+%if %{with_sysvinit} >+/sbin/chkconfig --add mediatomb >+%endif >+%if %{with_systemd} > if [ $1 -eq 1 ] ; then > # Initial installation > /bin/systemctl daemon-reload >/dev/null 2>&1 || : > fi >+%endif > > > %preun >-#if [ $1 = 0 ]; then >-# /sbin/service mediatomb stop >/dev/null 2>&1 >-# /sbin/chkconfig --del mediatomb >-#fi >+%if %{with_sysvinit} >+if [ $1 = 0 ]; then >+ /sbin/service mediatomb stop >/dev/null 2>&1 >+ /sbin/chkconfig --del mediatomb >+fi >+%endif >+%if %{with_systemd} > if [ $1 -eq 0 ] ; then > # Package removal, not upgrade > /bin/systemctl --no-reload disable mediatomb.service > /dev/null 2>&1 || : > /bin/systemctl stop mediatomb.service > /dev/null 2>&1 || : > fi >+%endif > > > %postun >+%if %{with_systemd} > /bin/systemctl daemon-reload >/dev/null 2>&1 || : > if [ $1 -ge 1 ] ; then > # Package upgrade, not uninstall > /bin/systemctl try-restart mediatomb.service >/dev/null 2>&1 || : > fi >+%endif >+ > >+%if %{with_systemd} > > %triggerun -- mediatomb < 0.1.12-16 > # Save the current service runlevel info >@@ -166,6 +184,8 @@ > /sbin/chkconfig --del mediatomb >/dev/null 2>&1 || : > /bin/systemctl try-restart mediatomb.service >/dev/null 2>&1 || : > >+%endif >+ > > > %files >@@ -182,9 +202,22 @@ > %{_bindir}/mediatomb > %{_datadir}/%{name}/ > %{_mandir}/man1/* >+%if %{with_sysvinit} >+%{_initrddir}/mediatomb >+%endif >+%if %{with_systemd} > %{_unitdir}/mediatomb.service >+%endif > > %changelog >+* Sun Sep 16 2012 David Jaša <jasa.david@gmail.com> - 0.12.1-19 >+- added patch to enable subtitles support >+ >+* Mon Sep 03 2012 David Jaša <djasa@redhat.com> - 0.12.1-18 >+- cleaned up conditionals handling Fedora <= 13 >+- added missing comma before flac-devel in BuildRequires >+- made .spec compatible with RHEL6 + EPEL >+ > * Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12.1-17 > - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 857751
: 613493