File glyr.spec of Package glyr

#
# spec file for package glyr
#
# Copyright (c) 2013 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 major   1

Name:           glyr
Version:        1.0.0
Release:        0
Summary:        Searcheninge for Musicrelated Metadata
License:        GPL-3.0+
Group:          Productivity/Networking/Web/Utilities
Url:            https://github.com/sahib/glyr
Source0:        https://github.com/downloads/sahib/%{name}/%{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE glyr-1.0.0-date-n-time.patch lazy.kent@opensuse.org -- remove __DATE and __TIME__ that causes the package to rebuild when not needed
Patch0:         glyr-1.0.0-date-n-time.patch
# PATCH-FIX-OPENSUSE glyr-0.9.9-optflags.patch lazy.kent@opensuse.org -- use default openSUSE optimization flags.
Patch1:         glyr-0.9.9-optflags.patch
# PATCH-FIX-OPENSUSE glyr-pkgconfig.patch crrodriguez@opensuse.org -- do not inject bogus dependencies into other packages.
Patch2:         glyr-pkgconfig.patch
BuildRequires:  cmake
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(libcurl)
BuildRequires:  pkgconfig(sqlite3)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The sort of metadata glyr is searching (and downloading) is usually the
data you see in your musicplayer. And indeed, originally it was written
to serve as internally library for a musicplayer, but has been extended
to work as a standalone program which is able to download:

* cover art;
* lyrics;
* bandphotos;
* artist biography;
* album reviews;
* tracklists of an album;
* a list of albums from a specific artist;
* tags, either related to artist, album or title relations, for example
  links to wikipedia;
* similar artists;
* similar songs.

%package -n glyrc
Summary:        Searcheninge for Musicrelated Metadata
Group:          Productivity/Networking/Web/Utilities
Provides:       glyr = %{version}
Obsoletes:      glyr < 1.0.0

%description -n glyrc
Glyr CLI tool.

The sort of metadata glyr is searching (and downloading) is usually the
data you see in your musicplayer. And indeed, originally it was written
to serve as internally library for a musicplayer, but has been extended
to work as a standalone program which is able to download:

* cover art;
* lyrics;
* bandphotos;
* artist biography;
* album reviews;
* tracklists of an album;
* a list of albums from a specific artist;
* tags, either related to artist, album or title relations, for example
  links to wikipedia;
* similar artists;
* similar songs.

%package -n libglyr%{major}
Summary:        Searcheninge for Musicrelated Metadata
Group:          System/Libraries

%description -n libglyr%{major}
Glyr shared library.

The sort of metadata glyr is searching (and downloading) is usually the
data you see in your musicplayer. And indeed, originally it was written
to serve as internally library for a musicplayer, but has been extended
to work as a standalone program which is able to download:

* cover art;
* lyrics;
* bandphotos;
* artist biography;
* album reviews;
* tracklists of an album;
* a list of albums from a specific artist;
* tags, either related to artist, album or title relations, for example
  links to wikipedia;
* similar artists;
* similar songs

%package -n libglyr-devel
Summary:        Searcheninge for Musicrelated Metadata
Group:          Development/Libraries/C and C++
Requires:       libglyr%{major} = %{version}

%description -n libglyr-devel
Glyr development files.

The sort of metadata glyr is searching (and downloading) is usually the
data you see in your musicplayer. And indeed, originally it was written
to serve as internally library for a musicplayer, but has been extended
to work as a standalone program which is able to download:

* cover art;
* lyrics;
* bandphotos;
* artist biography;
* album reviews;
* tracklists of an album;
* a list of albums from a specific artist;
* tags, either related to artist, album or title relations, for example
  links to wikipedia;
* similar artists;
* similar songs

%prep
%setup -qn %{name}
%patch0
%patch1
%patch2
%build
mkdir build
cd build
export CFLAGS="%{optflags} -D_GNU_SOURCE"
export CXXFLAGS="%{optflags} -D_GNU_SOURCE"
cmake .. \
%if "%_lib" == "lib64"
    -DLIB_SUFFIX="64" \
%endif
    -DCMAKE_INSTALL_PREFIX=%{_prefix}
make %{?_smp_mflags} VERBOSE=1

%install
pushd build
%make_install

%post -n libglyr%{major} -p /sbin/ldconfig

%postun -n libglyr%{major} -p /sbin/ldconfig

%files -n glyrc
%defattr(-,root,root,-)
%doc AUTHORS CHANGELOG COPYING README.textile state_of_providers.txt
%{_bindir}/glyrc

%files -n libglyr%{major}
%defattr(-,root,root,-)
%doc COPYING
%{_libdir}/*.so.*

%files -n libglyr-devel
%defattr(-,root,root,-)
%doc src/examples
%{_includedir}/%{name}
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc

%changelog
openSUSE Build Service is sponsored by