Merge branch 'master' of ssh://drop.maemo.org/git/mdictionary
[mdictionary] / rpm / mdictionary.spec
1 Name:       mdictionary
2 Summary:    Multilingual Dictionary
3 Version:    2.1.0
4 Release:    3
5 Group:      Applications/Productivity
6 License:    GPLv3
7 Source0:    %{name}.tar.bz2
8 BuildArch:  i386
9 URL:        http://mdictionary.garage.maemo.org
10 Vendor:     Comarch
11 Packager:   Marcin Kazmierczak
12 Autoreq:    0
13 Requires:   libqtcore4 >= 4.7
14 Requires:   libqtgui4 >= 4.7
15 Requires:   libqtsql4 >= 4.7
16 Requires:   libqtsql4-sqlite >= 4.7
17 Requires:   libqtwebkit4 >= 2.0
18 Requires:   libqtxml4 >= 4.7
19 Requires:   libqtxmlpatterns4 >= 4.7
20 Requires:   libqtnetwork4 >= 4.7
21 Requires:   libqtdeclarative4 >= 4.7
22
23
24 %description
25 Description: %{summary}
26
27
28 %package google-plugin
29 Summary:    Google plugin for mDictionary
30 Group:      Applications/Productivity
31 Requires:   %{name} = %{version}-%{release}
32 Requires:   libqtnetwork4 >= 4.7
33
34 %description google-plugin
35 Description: %{summary}
36
37 %package stardict-plugin
38 Summary:    Stardict plugin for mDictionary
39 Group:      Applications/Productivity
40 Requires:   %{name} = %{version}-%{release}
41
42 %description stardict-plugin
43 Description: %{summary}
44
45 %package devel
46 Summary:    mDictionary development files
47 Group:      Development/Libraries
48 Requires:   %{name} = %{version}-%{release}
49 Requires:   libqtdevel >= 4.7
50 Requires:   libqtcore4 >= 4.7
51 Requires:   libqtgui4 >= 4.7
52 Requires:   libqtxml4 >= 4.7
53 Requires:   libqtxmlpatterns4 >= 4.7
54 Requires:   libqtsql4 >= 4.7
55 Requires:   libqtsql4-sqlite >= 4.7
56 Requires:   libqtdbus4 >= 4.7
57 Requires:   libqtwebkit4 >= 2.0
58 Requires:   libqtdeclarative4 >= 4.7
59
60 %description devel
61 Description: %{summary}
62
63 %package doc
64 Summary:    mDictionary documentation
65 Group:      Documentation
66 Requires:   %{name} = %{version}-%{release}
67
68 %description doc
69 Description: %{summary}
70
71 %package homescreen-widget
72 Summary:    home screen widget for mDictionary
73 Group:      Applications/Productivity
74 Requires:   %{name} = %{version}-%{release}
75 Requires:   qt4-homescreen-loader
76 Requires:   libqtdbus4 >= 4.7
77
78 %description homescreen-widget
79 Description: %{summary}
80
81 %prep
82 %setup -q -n %{name}
83
84 # >> setup
85 # << setup
86
87 %build
88 # >> build pre
89 # << build pre
90
91 qmake "CONFIG+=meego_css"
92
93 make %{?jobs:-j%jobs}
94
95 # >> build post
96 # << build post
97 %install
98 rm -rf %{buildroot}
99 # >> install pre
100 # << install pre
101 #%qmake_install
102 make install -j4 INSTALL_ROOT=%{buildroot}
103
104 # >> install post
105 # << install post
106 desktop-file-install --delete-original       \
107   --dir %{buildroot}%{_datadir}/applications             \
108    %{buildroot}%{_datadir}/applications/*.desktop
109
110
111
112 %post
113 /bin/touch --no-create %{_datadir}/icons/hicolor || :
114 %{_bindir}/gtk-update-icon-cache \
115   --quiet %{_datadir}/icons/hicolor 2> /dev/null|| :
116
117 %postun
118 /bin/touch --no-create %{_datadir}/icons/hicolor || :
119 %{_bindir}/gtk-update-icon-cache \
120   --quiet %{_datadir}/icons/hicolor 2> /dev/null|| :
121
122 %clean
123 rm -rf %{buildroot}
124
125 %files
126 %defattr(-,root,root,-)
127 # >> files
128 /usr/share/dbus-1/*
129 /usr/share/icons/*
130 %dir /usr/share/mdictionary
131 /usr/share/mdictionary/staron.png
132 /usr/bin/mdictionary
133 %dir /usr/lib/mdictionary
134 %dir /usr/lib/mdictionary/plugins
135 /usr/lib/mdictionary/plugins/libxdxf.so
136 /usr/lib/mdictionary/plugins/eng-us.xdxf
137 /usr/lib/mdictionary/plugins/eng-thai.xdxf
138 /usr/share/mdictionary/xdxf.png
139 /usr/share/mdictionary/css
140 /usr/share/mdictionary/qml
141 /usr/share/applications/mdictionary.desktop
142 # << files
143
144
145 %files google-plugin
146 %defattr(-,root,root,-)
147 # >> files mdictionary-google-plugin
148 /usr/lib/mdictionary/plugins/libgoogle.so
149 /usr/share/mdictionary/google.png
150 # << files mdictionary-google-plugin
151
152 %files stardict-plugin
153 %defattr(-,root,root,-)
154 # >> files mdictionary-stardict-plugin
155 /usr/lib/mdictionary/plugins/libstardict.so
156 /usr/share/mdictionary/stardict.png
157 # << files mdictionary-stardict-plugin
158
159 %files devel
160 %defattr(-,root,root,-)
161 # >> files mdictionary-dev
162 /usr/include/*
163 # << files mdictionary-dev
164
165 %files doc
166 %defattr(-,root,root,-)
167 # >> files mdictionary-doc
168 /usr/share/doc/mdictionary
169 %doc AUTHORS
170 # << files mdictionary-doc
171
172 %files homescreen-widget
173 %defattr(-,root,root,-)
174 # >> files mdictionary-homescreen-widget
175 /usr/lib/hildon-desktop/*
176 /usr/share/applications/hildon-home/*
177 # << files mdictionary-homescreen-widget
178
179
180 %changelog
181 * Wed Feb 16 2011 Marcin Kazmierczak <marcin.kazmierczak@comarch.com>
182
183 - Create spec file for mdictionary
184