File flickcurl.spec of Package flickcurl

#
# spec file for package flickcurl
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#


%define soname 0

Name:           flickcurl
Version:        1.21
Release:        3
License:        LGPLv2.1
Summary:        Command-Line Tools for the Flickr Web Service
Url:            http://librdf.org/flickcurl/
Group:          Productivity/Networking/Other
# http://download.dajobe.org/flickcurl/flickcurl-%{version}.tar.gz
Source:         flickcurl-%{version}.tar.bz2
Source99:       flickcurl-rpmlintrc
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  curl
BuildRequires:  fdupes
BuildRequires:  gtkdoc
BuildRequires:  libcurl-devel
BuildRequires:  libraptor-devel >= 1.4.0
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(libxml-2.0)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Patch0:         flickcurl-curl.patch

%description
Flickcurl is a C library for calling the Flickr Web service API. It handles the
API signing, token management, and parameter encoding and decoding, resulting
in C functions for the Web services APIs. It... uses libcurl to call the REST
Web service, and libxml2 to manipulate the XML responses. The library supports
reading photo, tag, and comments information, the photo upload and searching
APIs, and writing tags and comments. It provides utilities such as "flickcurl"
to exercise the API and "flickrdf" to get RDF metadata descriptions out of
photos, tags, and machine tags.

%package doc
Summary:        C Library API to the Flickr Web Service (Documentation)
Group:          Documentation/Other

%description doc
Flickcurl is a C library for calling the Flickr Web service API. It handles the
API signing, token management, and parameter encoding and decoding, resulting
in C functions for the Web services APIs. It... uses libcurl to call the REST
Web service, and libxml2 to manipulate the XML responses. The library supports
reading photo, tag, and comments information, the photo upload and searching
APIs, and writing tags and comments. It provides utilities such as "flickcurl"
to exercise the API and "flickrdf" to get RDF metadata descriptions out of
photos, tags, and machine tags.

This subpackage contains the developer documentation for %{name}.

%package -n libflickcurl%{soname}
Summary:        C Library API to the Flickr Web Service
Group:          System/Libraries

%description -n libflickcurl%{soname}
Flickcurl is a C library for calling the Flickr Web service API. It handles the
API signing, token management, and parameter encoding and decoding, resulting
in C functions for the Web services APIs. It... uses libcurl to call the REST
Web service, and libxml2 to manipulate the XML responses. The library supports
reading photo, tag, and comments information, the photo upload and searching
APIs, and writing tags and comments. It provides utilities such as "flickcurl"
to exercise the API and "flickrdf" to get RDF metadata descriptions out of
photos, tags, and machine tags.

%package -n libflickcurl-devel
Summary:        C Library API to the Flickr Web Service
Group:          Development/Libraries/C and C++
Requires:       libcurl-devel
Requires:       libflickcurl%{soname} = %{version}
Requires:       libraptor-devel >= 1.4.0
Requires:       pkgconfig(libxml-2.0)

%description -n libflickcurl-devel
Flickcurl is a C library for calling the Flickr Web service API. It handles the
API signing, token management, and parameter encoding and decoding, resulting
in C functions for the Web services APIs. It... uses libcurl to call the REST
Web service, and libxml2 to manipulate the XML responses. The library supports
reading photo, tag, and comments information, the photo upload and searching
APIs, and writing tags and comments. It provides utilities such as "flickcurl"
to exercise the API and "flickrdf" to get RDF metadata descriptions out of
photos, tags, and machine tags.

%prep
%setup -q
%patch0

%build
autoreconf -fiv
%configure \
    --enable-gtk-doc \
    --enable-gtk-doc-html

make %{?_smp_mflags}

%install
%make_install
%fdupes -s %{buildroot}

install -d "%{buildroot}%{_docdir}/lib%{name}%{soname}"
install -m0644 AUTHORS ChangeLog COPYING.LIB LICENSE* NEWS* NOTICE README* "%{buildroot}%{_docdir}/lib%{name}%{soname}"
mkdir -p .doc
ln -s ../lib%{name}%{soname} .doc/%{name}

%post   -n libflickcurl%{soname} -p /sbin/ldconfig

%postun -n libflickcurl%{soname} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc .doc/%{name}
%{_bindir}/flickcurl
%{_bindir}/flickrdf
%doc %{_mandir}/man1/flickcurl.1%{ext_man}
%doc %{_mandir}/man1/flickrdf.1%{ext_man}

%files -n libflickcurl%{soname}
%defattr(-,root,root)
%doc %{_docdir}/lib%{name}%{soname}
%doc %{_docdir}/lib%{name}%{soname}/COPYING*
%doc %{_docdir}/lib%{name}%{soname}/LICENSE*
%{_libdir}/libflickcurl.so.%{soname}
%{_libdir}/libflickcurl.so.%{soname}.*.*

%files -n libflickcurl-devel
%defattr(-,root,root)
%{_bindir}/flickcurl-config
%{_includedir}/flickcurl.h
%{_libdir}/libflickcurl.so
%{_libdir}/libflickcurl.la
%{_libdir}/libflickcurl.a
%{_libdir}/pkgconfig/flickcurl.pc
%doc %{_mandir}/man1/flickcurl-config.1%{ext_man}

%files doc
%defattr(-,root,root)
%doc %dir %{_docdir}/lib%{name}%{soname}
%doc %{_docdir}/lib%{name}%{soname}/AUTHORS
%doc %{_docdir}/lib%{name}%{soname}/ChangeLog
%doc %{_docdir}/lib%{name}%{soname}/NEWS*
%doc %{_docdir}/lib%{name}%{soname}/NOTICE
%doc %{_docdir}/lib%{name}%{soname}/README*
%{_datadir}/gtk-doc/html/flickcurl

%changelog
openSUSE Build Service is sponsored by