File ushare.spec of Package ushare

#
# spec file for package ushare
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2011, Sascha Peilicke <saschpe@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           ushare
Version:        1.1a
Release:        0
Summary:        UPnP (TM) A/V Media Server
License:        GPL-2.0+
Group:          Productivity/Networking/File-Sharing
Url:            http://sourceforge.net/projects/ushare
Source:         http://downloads.sourceforge.net/ushare/ushare-%{version}.tar.bz2
Source2:        ushare.rc.suse
#Patch:          ushare-init_d-fix.patch
Patch1:         ushare-mts.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch2:         includes-fix.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch3:         types-fix.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch4:         upnp167-port.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch5:         write-warning-fix.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch6:         util_iconv.c.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch7:         ushare.conf.defs.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch8:         ushare.conf.locale.patch
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(libupnp)
Requires(pre):  %insserv_prereq

%description
GeeXboX uShare is a UPnP (TM) A/V Media Server. It implements the server
component that provides UPnP media devices with information on available
multimedia files. uShare uses the built-in http server of libupnp to stream
the files to clients.

%prep
%setup -q
#%patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6
%patch7
%patch8

%build
export CFLAGS="%{optflags} -fgnu89-inline"
export LDFLAGS="%{optflags}"
# not autotools configure
./configure --prefix=/usr --bindir=/usr/bin --sysconfdir=/etc --disable-strip --disable-optimize
make %{?_smp_mflags}

%install
%make_install
install -Dpm 755 %{SOURCE2} %{buildroot}%{_initddir}/ushare
install -d %{buildroot}%{_prefix}/sbin
ln -sf %{_initddir}/ushare %{buildroot}%{_sbindir}/rc%{name}
%find_lang %{name}

%preun
%{stop_on_removal ushare}

%postun
%insserv_cleanup

%post
%{fillup_and_insserv -f ushare}

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%{_bindir}/*
%{_sbindir}/rc%{name}
%{_sysconfdir}/init.d/ushare
%config %{_sysconfdir}/ushare.conf

%changelog
openSUSE Build Service is sponsored by