SHA256
1
0
forked from pool/lilv
lilv/lilv.spec

273 lines
7.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package [lilv]
#
# 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/
#
# norootforbuild
Name: lilv
Version: 0.4.2
Release: 1
Summary: A simple yet powerful C API for using LV2 plugins
Group: System/Libraries
License: MIT
URL: http://drobilla.net/software/lilv/
Source0: http://download.drobilla.net/%{name}-%{version}.tar.bz2
Source1: http://download.drobilla.net/sord-%{version}.tar.bz2
Source2: http://download.drobilla.net/serd-%{version}.tar.bz2
Source3: lv2_shaded_blue.svg
Patch0: lilv-0.4.2-lserd.patch
Patch1: lilv-0.4.2-serdlib.patch
Patch2: lilv-0.4.2-sordlib.patch
Patch3: lilv-0.4.2-pc.patch
#Icon: lv2_shaded_blue.svg
BuildRequires: python-base glib2-devel
BuildRequires: doxygen graphviz fdupes
BuildRequires: lv2core-devel jack-devel
BuildRequires: gcc-c++ pkg-config
BuildRequires: swig python-devel
#BuildRequires: hicolor-icon-theme
#Requires:
%description
Lilv is a library to make the use of LV2 plugins as simple as
possible for applications. Lilv is the successor to SLV2,
rewritten to be significantly faster and have minimal
dependencies. Lilv is Free Software (using an extremely
liberal “MIT-style” license) written in C99 using Serd and
Sord, and is known to work on GNU/Linux, Mac OS X, and
Windows 7 with MingW. This package contains the tools.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing apps with LV2 plugin support. This package contains the
documentation, packageconfig and header files.
%package -n liblilv0
Summary: A simple yet powerful C API for using LV2 plugins
Group: System/Libraries
%description -n liblilv0
Liblilv is a library to make the use of LV2 plugins as simple as
possible for applications. Lilv is the successor to SLV2,
rewritten to be significantly faster and have minimal
dependencies.
%package -n libserd0
Summary: Lightweight RDF syntax library
Group: System/Libraries
%description -n libserd0
Libserd is a lightweight RDF syntax library used by livl.
%package -n libsord0
Summary: Lightweight C lib for storing RDF statements
Group: System/Libraries
%description -n libsord0
Libsord is a lightweight C library that is used by lilv for storing
RDF statements in memory.
%define buildir %{_builddir}/%{name}-%{version}
%prep
#chmod --verbose 0644 %%{S:0}
#chmod --verbose 0644 %%{S:1}
#chmod --verbose 0644 %%{S:2}
chmod --verbose 0644 %{S:3}
%setup -q -a 1 -a 2
%patch0
%patch1
%patch2
%patch3
# Create serd .pc file with macros for the build
echo "prefix=%{buildir}/serd-%{version}">serd.pc
echo "exec_prefix=\${prefix}">>serd.pc
echo "libdir=%{buildir}/serd-%{version}/build">>serd.pc
echo "includedir=%{buildir}/serd-%{version}">>serd.pc
echo "">>serd.pc
echo "Name: Serd">>serd.pc
echo "Version: %{version}">>serd.pc
echo "Description: Lightweight RDF syntax library">>serd.pc
echo "Libs: -L\${libdir} -lserd">>serd.pc
echo "Cflags: -I\${includedir}">>serd.pc
echo "">>serd.pc
# Create sord .pc file with macros for the build
echo "prefix=%{buildir}/sord-%{version}">sord.pc
echo "exec_prefix=\${prefix}">>sord.pc
echo "libdir=%{buildir}/sord-%{version}/build">>sord.pc
echo "includedir=%{buildir}/sord-%{version}">>sord.pc
echo "">>sord.pc
echo "Name: Sord">>sord.pc
echo "Version: %{version}">>sord.pc
echo "Description: A lightweight C library for storing RDF statements in memory.">>sord.pc
echo "Libs: -L%{buildir}/serd-%{version}/build -lserd -L\${libdir} -lsord">>sord.pc
echo "Cflags: -I\${includedir}">>sord.pc
echo "">>sord.pc
export PKG_CONFIG_PATH=${PWD}
%build
# Use a bash function for the three builds.
wafbuild() {
export DEFAULT_LV2_PATH=%{_libdir}/lv2
export PKG_CONFIG_PATH=%{_builddir}/lilv-%{version}
export LIBPATH_SERD=%{buildir}/serd-%{version}/build
export LIBPATH_SORD=%{buildir}/sord-%{version}/build
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
./waf configure --prefix=%{_prefix} \
--datadir=%{_datadir}/%{name} \
--includedir=%{_includedir} \
--libdir=%{_libdir} \
--docdir=%{_docdir} \
--mandir=%{_mandir} \
--datadir=%{_datadir} \
--download \
--docs $1 $2
if test $? != 0; then
exit 1
fi
./waf build -v %{?jobs:-j%{jobs}}
if test $? != 0; then
exit 1
fi
/sbin/ldconfig -vn build/
}
pushd serd-%{version}
wafbuild "" ""
popd
pushd sord-%{version}
wafbuild "" ""
popd
wafbuild --default-lv2-path=%{_libdir}/lv2 --bindings
unset PKG_CONFIG_PATH
%install
pushd serd-%{version}
./waf install --destdir=%{buildroot}
popd
pushd sord-%{version}
./waf install --destdir=%{buildroot}
popd
./waf install --destdir=%{buildroot}
find %{buildroot} -name '*.la' -exec rm -f {} ';'
chmod -c 0755 %{buildroot}%{_libdir}/*.so.%{version}
documents="AUTHORS ChangeLog COPYING README"
for i in ${documents}; do
cp $i %{buildroot}%{_docdir}/%{name}/
cp serd-%{version}/$i %{buildroot}%{_docdir}/serd/
cp sord-%{version}/$i %{buildroot}%{_docdir}/sord/
done
#mkdir -p %%{_datadir}/icons/hicolor/scalable/apps
#install -m 0644 %%{S:3} %%{_datadir}/icons/hicolor/scalable/apps/
%fdupes -s %{buildroot}%{_docdir}
%clean
rm -rf %{buildroot}
#%%post
# %%icon_theme_cache_post()
#%%postun
# %%icon_theme_cache_postun()
%post -n liblilv0
/sbin/ldconfig
%postun -n liblilv0
/sbin/ldconfig
%post -n libserd0
/sbin/ldconfig
%postun -n libserd0
/sbin/ldconfig
%post -n libsord0
/sbin/ldconfig
%postun -n libsord0
/sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_bindir}/lilv-bench
%{_bindir}/lv2info
%{_bindir}/lv2ls
%{_bindir}/serdi
%{_bindir}/sordi
%{_mandir}/man1/*
%{_mandir}/man3/*
#%%{_datadir}/icons/hicolor/scalable/apps/lv2_shaded_blue.svg
%config %{_sysconfdir}/bash_completion.d/%{name}
%files devel
%defattr(-,root,root,-)
%dir %{_docdir}/%{name}
%dir %{_docdir}/serd
%dir %{_docdir}/sord
%{_docdir}/%{name}/*
%{_docdir}/serd/*
%{_docdir}/sord/*
%dir %{_includedir}/lilv-
%dir %{_includedir}/serd-
%dir %{_includedir}/sord-
%dir %{_includedir}/lilv-/lilv
%dir %{_includedir}/serd-/serd
%dir %{_includedir}/sord-/sord
%{_includedir}/lilv-/lilv/lilv.h
%{_includedir}/lilv-/lilv/lilvmm.hpp
%{_includedir}/serd-/serd/serd.h
%{_includedir}/sord-/sord/sord.h
%{_includedir}/sord-/sord/sordmm.hpp
#%%{_includedir}/*
%{_libdir}/lib%{name}.so
%{_libdir}/libserd.so
%{_libdir}/libsord.so
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/pkgconfig/serd.pc
%{_libdir}/pkgconfig/sord.pc
%files -n liblilv0
%defattr(-,root,root,-)
%{_libdir}/liblilv.so.0
%{_libdir}/liblilv.so.0.4.2
%files -n libserd0
%defattr(-,root,root,-)
%{_libdir}/libserd.so.0
%{_libdir}/libserd.so.0.4.2
%files -n libsord0
%defattr(-,root,root,-)
%{_libdir}/libsord.so.0
%{_libdir}/libsord.so.0.4.2
%changelog