File djmount.spec of Package djmount

#
# spec file for package djmount (0.71)
#
# Copyright (c) 2010 Malcolm J Lewis <malcolmlewis@opensuse.org>
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.

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

Name:           djmount
Version:        0.71
Release:        1
License:        GPLv2+
Summary:        Mount MediaServer content as a Linux file system
Url:            http://djmount.sourceforge.net
Group:          Productivity/Multimedia/Other
Source0:        %{name}-%{version}.tar.bz2
#Source0:       http://downloads.sourceforge.net/%%{name}/%%{name}-%%{version}.tar.gz
# Man page care of debian patches
Source1:        djmount.1
# PATCH-FIX-OPENSUSE djmount-implicit-fortify-decl.patch malcolmlewis@opensuse.org -- Fix declaration specifiers and implicit-fortify-decl patch
Patch0:         djmount-implicit-fortify-decl.patch
# PATCH-FIX-OPENSUSE djmount-no-return-in-nonvoid-function.patch malcolmlewis@opensuse.org -- Fix no-return-in-nonvoid-function errors
Patch1:         djmount-no-return-in-nonvoid-function.patch
BuildRequires:  fuse-devel
BuildRequires:  libtalloc-devel
BuildRequires:  libupnp-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
djmount is a UPnP AV client. It mounts as a Linux file system the media content
of compatible UPnP AV devices. Djmount discovers automatically all UPnP AV
Media Servers on the network, and make the content available in a directory
tree. All shared files (e.g. Audio or Video files) are directly visible and
can be played using your favorite media player.

%prep
%setup -q
%patch0
%patch1
iconv -f iso8859-1 -t utf-8 ChangeLog > ChangeLog.conv && \
 touch -r ChangeLog ChangeLog.conv && mv -f ChangeLog.conv ChangeLog
iconv -f iso8859-1 -t utf-8 AUTHORS > AUTHORS.conv && \
 touch -r AUTHORS AUTHORS.conv && mv -f AUTHORS.conv AUTHORS
iconv -f iso8859-1 -t utf-8 README > README.conv && \
 touch -r README README.conv && mv -f README.conv README
iconv -f iso8859-1 -t utf-8 THANKS > THANKS.conv && \
 touch -r THANKS THANKS.conv && mv -f THANKS.conv THANKS
iconv -f iso8859-1 -t utf-8 NEWS > NEWS.conv && \
 touch -r NEWS NEWS.conv && mv -f NEWS.conv NEWS

%build
%configure --prefix=%{_prefix} \
           --libdir=%{_libdir} \
	   --with-external-talloc \
	   --with-external-libupnp

make %{?_smp_mflags}

%install
%if 0%{?suse_version} >= 1120
%make_install
%else
make DESTDIR=%{buildroot} install
%endif
# Install man page
mkdir -p %{buildroot}%{_mandir}/man1
install -Dm0644 %{S:1} %{buildroot}%{_mandir}/man1/

%clean
rm -rf '%{buildroot}'

%files
%defattr(-,root,root,-)
%doc COPYING README NEWS AUTHORS ChangeLog TODO THANKS search_help.txt
%{_bindir}/djmount
%{_mandir}/man1/djmount.1.gz

%changelog
openSUSE Build Service is sponsored by