summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Andriot <francois.andriot@free.fr>2011-11-29 23:09:56 +0100
committerFrancois Andriot <francois.andriot@free.fr>2011-11-29 23:09:56 +0100
commite70744ebe2de3269ed8e27929afca9f3b986a3be (patch)
tree02e485ec513b30ea9d403ab6a92a2178e4ee3972
parentaba156113fe7419d780c683e1c4929ae9b7fde02 (diff)
downloadtde-packaging-e70744eb.tar.gz
tde-packaging-e70744eb.zip
Amarok: add libkarma support
-rw-r--r--redhat/applications/amarok/trinity-amarok.spec43
-rw-r--r--redhat/extras/libkarma/karma-sharp.dll.config3
-rw-r--r--redhat/extras/libkarma/libkarma-0.1.2.tar.gzbin0 -> 81447 bytes
-rw-r--r--redhat/extras/libkarma/libkarma.spec131
-rw-r--r--redhat/extras/libkarma/multimedia-player-rio-karma.pngbin0 -> 1760 bytes
-rw-r--r--redhat/extras/libkarma/preferences.fdi19
6 files changed, 180 insertions, 16 deletions
diff --git a/redhat/applications/amarok/trinity-amarok.spec b/redhat/applications/amarok/trinity-amarok.spec
index a655c0794..35580490f 100644
--- a/redhat/applications/amarok/trinity-amarok.spec
+++ b/redhat/applications/amarok/trinity-amarok.spec
@@ -1,7 +1,7 @@
# Basic package informations
%define kdecomp amarok
%define version 1.4.10
-%define release 2
+%define release 3
# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?_prefix}" != "/usr"
@@ -16,9 +16,6 @@ BuildRequires: cmake >= 2.8
%define tde_libdir %{_libdir}/trinity
-# TODO:
-# Rio Karma support : libkarma
-
Name: trinity-%{kdecomp}
Summary: A drop-down terminal emulator.
Version: %{version}
@@ -27,15 +24,18 @@ Release: %{release}%{?dist}%{?_variant}
Group: Applications/Multimedia
License: GPLv2+
Url: http://amarok.kde.org
-Source0: amarok-3.5.13.tar.gz
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Source0: amarok-3.5.13.tar.gz
+
# RedHat / Fedora legacy patches
Patch1: amarok-1.4.8-gcc43.patch
# TDE 3.5.13 RHEL/Fedora patches
Patch2: amarok-3.5.13-cmake_konqsidebar.patch
Patch3: amarok-3.5.13-taglib_include.patch
+Patch4: amarok-3.5.13-enable_riokarma.patch
BuildRequires: alsa-lib-devel
BuildRequires: desktop-file-utils
@@ -66,6 +66,7 @@ BuildRequires: ruby-devel ruby
BuildRequires: SDL-devel
BuildRequires: taglib-devel
BuildRequires: sqlite-devel
+BuildRequires: libkarma-devel karma-sharp
# not used anymore, in favor of libvisual ? -- Rex
#%{?fedora:BuildRequires: xmms-devel}
BuildRequires: dbus-devel
@@ -128,6 +129,7 @@ use any of xmms' visualisation plugins with Amarok.
%patch1 -p1 -b .gcc43
%patch2 -p0
%patch3 -p1
+%patch4 -p1
%build
@@ -147,7 +149,7 @@ cd build
-DWITH_IFP=ON \
-DWITH_NJB=ON \
-DWITH_MTP=ON \
- -DWITH_RIOKARMA=OFF \
+ -DWITH_RIOKARMA=ON \
-DWITH_DAAP=ON \
-DBUILD_ALL=ON \
-DQT_LIBRARY_DIRS=${QTLIB} \
@@ -166,15 +168,23 @@ desktop-file-install --vendor "" \
$RPM_BUILD_ROOT%{_datadir}/applications/kde/amarok.desktop
# unpackaged files
-rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la
+%__rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la
# HTML
-for lang_dir in $RPM_BUILD_ROOT%{_docdir}/HTML/* ; do
+for lang_dir in $RPM_BUILD_ROOT%{tde_docdir}/HTML/* ; do
if [ -d $lang_dir ]; then
lang=$(basename $lang_dir)
- [ "$lang" == "en" ] && d=en/%{name} || d=$lang
- echo "%lang($lang) %doc %{_docdir}/HTML/$d" >> %{name}.lang
+ [ "$lang" == "en" ] && d=en/amarok || d=$lang
+ echo "%lang($lang) %doc %{tde_docdir}/HTML/$d" >> %{name}.lang
+ fi
+done
+
+# Locales
+for locale in $RPM_BUILD_ROOT%{_datadir}/locale/* ; do
+ if [ -r $locale/LC_MESSAGES/amarok.mo ]; then
+ lang=$(basename $locale)
+ echo "%lang($lang) %{_datadir}/locale/$lang/LC_MESSAGES/amarok.mo" >> %{name}.lang
fi
done
@@ -194,7 +204,7 @@ xdg-desktop-menu forceupdate 2> /dev/null || :
%__rm -fr $RPM_BUILD_ROOT
-%files
+%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING AUTHORS ChangeLog README
%{_bindir}/amarok
@@ -244,8 +254,8 @@ xdg-desktop-menu forceupdate 2> /dev/null || :
%{_datadir}/services/amarok_mtp-mediadevice.desktop
%{tde_libdir}/libamarok_mtp-mediadevice.*
# Rio Karma
-#%{_datadir}/services/amarok_riokarma-mediadevice.desktop
-#%{tde_libdir}/libamarok_riokarma-mediadevice.*
+%{_datadir}/services/amarok_riokarma-mediadevice.desktop
+%{tde_libdir}/libamarok_riokarma-mediadevice.*
# Void engine (noop)
%{_datadir}/services/amarok_void-engine_plugin.desktop
%{tde_libdir}/libamarok_void-engine_plugin.*
@@ -260,9 +270,6 @@ xdg-desktop-menu forceupdate 2> /dev/null || :
%{tde_libdir}/libamarok_yauap-engine_plugin.*
-%{tde_docdir}/HTML/*/amarok
-%{_datadir}/locale/*/LC_MESSAGES/amarok.mo
-
%files konqueror
%defattr(-,root,root,-)
%{_datadir}/apps/konqueror/servicemenus/*.desktop
@@ -275,6 +282,10 @@ xdg-desktop-menu forceupdate 2> /dev/null || :
%changelog
+* Mon Nov 28 2011 Francois Andriot <francois.andriot@free.fr> - 1.4.10-3
+- Enable riokarma support
+- Enhance localized files packaging
+
* Sat Nov 26 2011 Francois Andriot <francois.andriot@free.fr> - 1.4.10-2
- Enable RHEL 5 compilation
- Add konqueror sidebar
diff --git a/redhat/extras/libkarma/karma-sharp.dll.config b/redhat/extras/libkarma/karma-sharp.dll.config
new file mode 100644
index 000000000..180d8b4fb
--- /dev/null
+++ b/redhat/extras/libkarma/karma-sharp.dll.config
@@ -0,0 +1,3 @@
+<configuration>
+ <dllmap dll="karma" target="libkarma.so.0" />
+</configuration> \ No newline at end of file
diff --git a/redhat/extras/libkarma/libkarma-0.1.2.tar.gz b/redhat/extras/libkarma/libkarma-0.1.2.tar.gz
new file mode 100644
index 000000000..3060acf72
--- /dev/null
+++ b/redhat/extras/libkarma/libkarma-0.1.2.tar.gz
Binary files differ
diff --git a/redhat/extras/libkarma/libkarma.spec b/redhat/extras/libkarma/libkarma.spec
new file mode 100644
index 000000000..cd7339145
--- /dev/null
+++ b/redhat/extras/libkarma/libkarma.spec
@@ -0,0 +1,131 @@
+%define major 0
+
+Summary: Rio Karma tools
+Name: libkarma
+Version: 0.1.2
+Release: 1%{?dist}
+License: GPLv2+
+Group: System/Libraries
+Url: http://www.freakysoft.de/html/libkarma/
+Source: http://www.freakysoft.de/libkarma/libkarma-%{version}.tar.gz
+Source2: http://bobcopeland.com/karma/banshee/preferences.fdi
+Source3: http://bobcopeland.com/karma/banshee/multimedia-player-rio-karma.png
+Source4: karma-sharp.dll.config
+BuildRoot: %{_tmppath}/%name-root
+BuildRequires: mono-devel
+BuildRequires: taglib-devel
+BuildRequires: libusb-devel
+BuildRequires: zlib-devel
+Requires: %{name}-libs >= %version
+%define _requires_exceptions libkarma
+
+%description
+Rio Karma access library
+
+%package libs
+Summary: Rio Karma access library
+Group: System/Libraries
+
+%description libs
+Rio Karma access library
+
+
+%package devel
+Summary: Rio Karma development files
+Group: Development/C
+Requires: %{name}-libs = %version
+Provides: %name-devel = %version-%release
+Obsoletes: %name-devel
+
+%description devel
+Rio Karma development files
+
+
+%package -n karma-sharp
+Summary: Rio Karma C# bindings
+Group: Development/Other
+Requires: %name = %version
+
+%description -n karma-sharp
+Rio Karma C# bindings
+
+
+%prep
+%setup -q -n libkarma-%{version}
+
+%build
+make PREFIX=$RPM_BUILD_ROOT/%_prefix
+
+%install
+rm -rf $RPM_BUILD_ROOT installed-docs
+mkdir -p $RPM_BUILD_ROOT
+make install PREFIX=$RPM_BUILD_ROOT/%_prefix CHOWNPROG=/bin/true CHGRPPROG=/bin/true
+perl -pi -e "s^%buildroot^^" %buildroot%_prefix/lib/pkgconfig/karma-sharp.pc
+%if %_lib != lib
+mv %buildroot%_prefix/lib %buildroot%_libdir
+perl -pi -e "s^/lib^/%_lib^" %buildroot%_libdir/pkgconfig/karma-sharp.pc
+%endif
+
+
+install -m 644 -D libkarma.fdi %buildroot%_sysconfdir/hal/fdi/information/20-rio-karma.fdi
+install -m 644 -D %SOURCE2 %buildroot%_sysconfdir/hal/fdi/policy/preferences.fdi
+install -m 644 -D %SOURCE3 %buildroot%_datadir/icons/hicolor/32x32/devices/multimedia-player-rio-karma.png
+
+cat > README%{?dist} << EOF
+For automatic mounting, add the following line to your
+/etc/fstab. Otherwise gnome-volume-manager will refuse to mount the
+device, as it doesn't know about the Karma's proprietary filesystem.
+
+/dev/disk/by-id/usb-Rio_Rio_Karma_0000000000000000-part2 /media/karma omfs user,noauto 0 0
+
+EOF
+
+install -m 644 %SOURCE4 %buildroot%_libdir/karma-sharp/karma-sharp.dll.config
+
+%post libs -p /sbin/ldconfig
+%postun libs -p /sbin/ldconfig
+
+%post
+gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+
+%postun
+gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%doc THANKS TODO README%{?dist}
+%config(noreplace) %_sysconfdir/hal/fdi/information/20-rio-karma.fdi
+%config(noreplace) %_sysconfdir/hal/fdi/policy/preferences.fdi
+%_bindir/riocp
+%_bindir/chprop
+%_mandir/man1/*.1*
+%attr(4755,root,root) %_bindir/karma_helper
+%_datadir/icons/hicolor/32x32/devices/multimedia-player-rio-karma.png
+%_docdir/%{name}
+
+%files libs
+%defattr(-,root,root)
+%_libdir/libkarma.so.%{major}*
+
+%files devel
+%defattr(-,root,root)
+%_includedir/*
+%_libdir/libkarma.a
+%_libdir/libkarma.so
+
+%files -n karma-sharp
+%defattr(-,root,root)
+%_libdir/karma-sharp/*
+%_libdir/pkgconfig/karma-sharp.pc
+
+
+
+
+%changelog
+* Mon Nov 28 2011 Francois Andriot <francois.andriot@free.fr> 0.1.2-1
+- Build for RHEL 5, RHEL 6, Fedora 15, Fedora 16
+- Based on 'libkarma-0.1.2-1mdv2011.0'
+
diff --git a/redhat/extras/libkarma/multimedia-player-rio-karma.png b/redhat/extras/libkarma/multimedia-player-rio-karma.png
new file mode 100644
index 000000000..79cc980ad
--- /dev/null
+++ b/redhat/extras/libkarma/multimedia-player-rio-karma.png
Binary files differ
diff --git a/redhat/extras/libkarma/preferences.fdi b/redhat/extras/libkarma/preferences.fdi
new file mode 100644
index 000000000..7e1021711
--- /dev/null
+++ b/redhat/extras/libkarma/preferences.fdi
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
+
+<deviceinfo version="0.2">
+ <device>
+ <match key="info.udi" string="/org/freedesktop/Hal/devices/storage_serial_Rio_Rio_Karma_0000000000000000">
+ <merge key="storage.policy.should_mount" type="bool">true</merge>
+ <merge key="storage.policy.is_removable" type="bool">true</merge>
+ <merge key="storage.policy.default.mount_root" type="string">/media</merge>
+ </match>
+</device>
+
+<device>
+ <match key="info.udi" string="/org/freedesktop/Hal/devices/volume_part2_size_19919976960">
+ <merge key="volume.policy.desired_mount_point" type="string">karma</merge>
+ <merge key="volume.policy.mount_filesystem" type="string">omfs</merge>
+ </match>
+</device>
+</deviceinfo>
+