]> git.pld-linux.org Git - packages/clementine.git/blob - clementine.spec
b84316eee2dd1578ad55eeff91b032bbb80ed14f
[packages/clementine.git] / clementine.spec
1 # TODO:
2 # - Gstreamer error: "A text/uri-list decoder plugin is required to play this stream, but not installed."
3 # - apply patches to libprojectM.spec and use
4 #
5 # Conditional build:
6 %bcond_without  static_sqlite   # with static sqlite3
7 %bcond_with     static_projectm # with static projectM
8
9 %define         qtver   %(pkg-config --silence-errors --modversion QtCore 2>/dev/null || echo ERROR)
10 Summary:        A music player and library organiser
11 Summary(hu.UTF-8):      Egy zenelejátszó és gyűjtemény-kezelő
12 Name:           clementine
13 Version:        1.1.1
14 Release:        2
15 License:        GPL v3 and GPL v2+
16 Group:          Applications/Multimedia
17 URL:            http://www.clementine-player.org/
18 Source0:        http://clementine-player.googlecode.com/files/%{name}-%{version}.tar.gz
19 # Source0-md5:  28e4afb822388bd337a761db8f86febf
20 Patch0:         desktop-install.patch
21 Patch1:         unbundle-po.patch
22 BuildRequires:  QtCore-devel >= %{qtver}
23 BuildRequires:  QtDBus-devel >= %{qtver}
24 BuildRequires:  QtGui-devel >= %{qtver}
25 BuildRequires:  QtIOCompressor-devel
26 BuildRequires:  QtNetwork-devel >= %{qtver}
27 BuildRequires:  QtOpenGL-devel >= %{qtver}
28 BuildRequires:  QtSingleApplication-devel >= 2.6-4
29 BuildRequires:  QtSql-devel >= %{qtver}
30 %{?with_tests:BuildRequires:    QtTest-devel >= %{qtver}}
31 BuildRequires:  QtXml-devel >= %{qtver}
32 BuildRequires:  boost-devel
33 BuildRequires:  cmake >= 2.6
34 #%{?with_static_projectm:BuildRequires: ftgl-devel >= 2.1.3}
35 BuildRequires:  gettext-devel
36 %{?with_static_projectm:BuildRequires:  glew-devel}
37 BuildRequires:  glib2-devel
38 BuildRequires:  gstreamer0.10-devel
39 BuildRequires:  gstreamer0.10-plugins-base-devel
40 BuildRequires:  gtest-devel
41 BuildRequires:  libgpod-devel >= 0.7.92
42 BuildRequires:  libimobiledevice-devel
43 BuildRequires:  libindicate-qt-devel
44 BuildRequires:  liblastfm-devel >= 0.3.3
45 BuildRequires:  libmtp-devel
46 BuildRequires:  libplist-devel
47 %{!?with_static_projectm:BuildRequires: libprojectM-devel >= 1:2.0.1-4}
48 BuildRequires:  libqxt-devel
49 BuildRequires:  libxml2-devel
50 BuildRequires:  pkgconfig
51 BuildRequires:  pkgconfig
52 BuildRequires:  protobuf-devel
53 BuildRequires:  qca-devel
54 BuildRequires:  qjson-devel
55 BuildRequires:  qt4-build >= %{qtver}
56 BuildRequires:  qt4-linguist
57 BuildRequires:  qt4-qmake
58 BuildRequires:  rpmbuild(find_lang) >= 1.33
59 BuildRequires:  rpmbuild(macros) >= 1.596
60 BuildRequires:  sed >= 4.0
61 %{!?with_static_sqlite:BuildRequires:   sqlite3-devel}
62 BuildRequires:  taglib-devel >= 1.6
63 BuildRequires:  usbmuxd-devel
64 Requires(post,postun):  desktop-file-utils
65 Requires(post,postun):  gtk-update-icon-cache
66 Requires(post,postun):  hicolor-icon-theme
67 Requires:       QtSingleApplication >= 2.6-4
68 %{!?with_static_sqlite:Requires:        QtSql-sqlite3 >= %{qtver}}
69 Requires:       gstreamer0.10-audio-effects-base
70 # while we do not link (yet), we use datafiles
71 Requires:       libprojectM
72 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73
74 # see libprojectM.spec for explanation
75 %define         filterout_ld    -Wl,--as-needed -Wl,--no-copy-dt-needed-entries
76
77 %description
78 Clementine is a modern music player and library organiser. It is
79 largely a port of Amarok 1.4, with some features rewritten to take
80 advantage of Qt4.
81
82 %description -l hu.UTF-8
83 Clementine egy modern zenelejátszó és gyűjtemény kezelő. Túlnyomórészt
84 az Amarok 1.4 port-ja, néhány funkciója újraírva, hogy kihasználhassa
85 a Qt4 előnyeit.
86
87 %prep
88 %setup -q -n %{name}-%{version}
89 %patch0 -p1
90 %patch1 -p1
91
92 # We already don't use these but just to make sure
93 rm -rf 3rdparty/gmock
94 %{!?with_static_sqlite:rm -rf 3rdparty/qsqlite}
95 rm -rf 3rdparty/qtsingleapplication
96 rm -rf 3rdparty/qxt
97 rm -rf 3rdparty/qtiocompressor
98 %{!?with_static_projectm:rm -rf 3rdparty/libprojectM}
99
100 # Don't build tests. They require gmock
101 sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
102 # remove -Wall
103 sed -i -e 's/-Wall//' src/CMakeLists.txt
104
105 %build
106 install -d build
107 install -d build/src/translations
108 cd build
109 %cmake \
110         -DBUNDLE_PROJECTM_PRESETS=OFF \
111         -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON \
112         -DQTSINGLEAPPLICATION_INCLUDE_DIRS=%{_includedir}/qt4/QtSolutions/ \
113         -DUSE_SYSTEM_QXT=ON \
114         -DUSE_SYSTEM_PROJECTM=ON \
115         -DSTATIC_SQLITE=%{?with_static_sqlite:ON}%{!?with_static_sqlite:OFF} \
116         ..
117 %{__make}
118
119 %install
120 rm -rf $RPM_BUILD_ROOT
121 %{__make} -C build install \
122         DESTDIR=$RPM_BUILD_ROOT
123
124 rm $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/application-x-clementine.svg
125
126 # not in our glibc?
127 rm -r $RPM_BUILD_ROOT%{_localedir}/tr_TR
128
129 %find_lang %{name} --with-qm
130
131 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps
132 cp -a dist/icons/ubuntu-mono-light/clementine-panel-grey.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel-grey.png
133 cp -a dist/icons/ubuntu-mono-light/clementine-panel.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/24x24/apps/clementine-panel.png
134
135 %clean
136 rm -rf $RPM_BUILD_ROOT
137
138 %post
139 %update_desktop_database_post
140 %update_icon_cache hicolor
141
142 %postun
143 %update_desktop_database_postun
144 %update_icon_cache hicolor
145
146 %files -f %{name}.lang
147 %defattr(644,root,root,755)
148 %doc Changelog
149 %attr(755,root,root) %{_bindir}/clementine
150 %attr(755,root,root) %{_bindir}/clementine-tagreader
151 %{_desktopdir}/clementine.desktop
152 %{_pixmapsdir}/clementine.png
153 %{_iconsdir}/hicolor/*/apps/clementine-panel-grey.png
154 %{_iconsdir}/hicolor/*/apps/clementine-panel.png
This page took 0.027203 seconds and 2 git commands to generate.