]>
Commit | Line | Data |
---|---|---|
d397ecbf ER |
1 | %define modname smileys |
2 | Summary: Drupal Smileys Module | |
238f2e36 | 3 | Summary(pl.UTF-8): Moduł Smileys dla Drupala |
d397ecbf ER |
4 | Name: drupal-mod-%{modname} |
5 | Version: 4.6.0 | |
cf2de601 | 6 | Release: 0.4 |
d397ecbf ER |
7 | License: GPL v2 |
8 | Group: Applications/WWW | |
9 | Source0: http://drupal.org/files/projects/%{modname}-%{version}.tar.gz | |
cf2de601 | 10 | # Source0-md5: d6381efeb83f702138c3e125b1d04b84 |
d397ecbf ER |
11 | URL: http://drupal.org/project/smileys |
12 | BuildRequires: rpmbuild(macros) >= 1.194 | |
13 | Requires: drupal >= 4.6.0 | |
14 | BuildArch: noarch | |
15 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
16 | ||
17 | %define _drupaldir %{_datadir}/drupal | |
18 | %define _moddir %{_drupaldir}/modules | |
19 | %define _htdocs %{_drupaldir}/htdocs | |
20 | %define _podir %{_drupaldir}/po/%{modname} | |
21 | %define _smileysdir %{_htdocs}/misc/smileys | |
22 | ||
23 | %description | |
24 | This is a simple smiley-filter that allows the easy use of graphical | |
25 | smileys (or 'emoticons') on a Drupal site. It comes with a set of | |
26 | example smileys, but you can define an unlimited amount of custom | |
27 | smileys as well. | |
28 | ||
8e653eba JR |
29 | %description -l pl.UTF-8 |
30 | To jest prosty filtr uśmieszków pozwalający na łatwe używanie | |
31 | graficznych uśmieszków ("emotikonów") na serwisie Drupala. Jest | |
32 | dostarczany z zestawem przykładowych uśmieszków, ale można także | |
33 | zdefiniować nieograniczoną liczbę własnych. | |
ef3fa6b0 | 34 | |
d397ecbf ER |
35 | %package examples |
36 | Summary: Example Smileys for Smileys Module | |
238f2e36 | 37 | Summary(pl.UTF-8): Przykładowe uśmieszki dla modułu Smileys |
d397ecbf ER |
38 | Group: Applications/WWW |
39 | Requires: %{name} = %{version}-%{release} | |
40 | ||
41 | %description examples | |
42 | Example Smileys for Smileys Module. | |
43 | ||
44 | A word from Author: | |
45 | Please don't rip the example smileys and use them without this | |
46 | module. I spent quite some time creating those little buggers. | |
47 | ||
8e653eba JR |
48 | %description examples -l pl.UTF-8 |
49 | Przykładowe uśmieszki dla modułu Smileys. | |
ef3fa6b0 | 50 | |
8e653eba JR |
51 | Słowo od autora: |
52 | Proszę nie wyciągać przykładowych uśmieszków i nie używać ich bez tego | |
53 | modułu. Spędziłem trochę czasu na ich tworzeniu. | |
ef3fa6b0 | 54 | |
d397ecbf ER |
55 | %prep |
56 | %setup -q -n %{modname} | |
57 | rm -f LICENSE.txt # GPL v2 | |
58 | ||
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | install -d $RPM_BUILD_ROOT{%{_moddir},%{_podir},%{_smileysdir}} | |
62 | ||
63 | install *.module $RPM_BUILD_ROOT%{_moddir} | |
64 | install examples/*.{gif,png} $RPM_BUILD_ROOT%{_smileysdir} | |
65 | cp -a po/*.po $RPM_BUILD_ROOT%{_podir} | |
66 | ||
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %post | |
71 | if [ "$1" = 1 ]; then | |
72 | %banner -e %{name} <<EOF | |
73 | To create Smileys MySQL database tables, import: | |
74 | zcat %{_docdir}/%{name}-%{version}/%{modname}.mysql.gz | mysql drupal | |
75 | For Postgresql file is: | |
76 | %{_docdir}/%{name}-%{version}/%{modname}.pgsql.gz | |
77 | ||
78 | If you want to use localization, then you need to upload .po files | |
79 | from %{_podir} via drupal locatization admin. | |
80 | ||
81 | The example smileys are available from %{name}-examples package. | |
82 | EOF | |
83 | fi | |
84 | ||
85 | %post examples | |
86 | if [ "$1" = 1 ]; then | |
87 | %banner -e %{name} <<EOF | |
88 | To use smileys from this package you need to import definitions: | |
89 | zcat %{_docdir}/%{name}-examples-%{version}/examples.mysql.gz | mysql drupal | |
90 | For Postgresql the file is: | |
91 | %{_docdir}/%{name}-examples-%{version}/examples.pgsql.gz | |
92 | EOF | |
93 | fi | |
94 | ||
95 | %files | |
96 | %defattr(644,root,root,755) | |
97 | %doc *.txt po/*.pot | |
98 | %doc *.txt | |
99 | %doc %{modname}.{mysql,pgsql} | |
100 | %{_moddir}/*.module | |
101 | %{_podir} | |
102 | %dir %{_smileysdir} | |
103 | ||
104 | %files examples | |
105 | %defattr(644,root,root,755) | |
106 | %doc examples.{mysql,pgsql} | |
107 | %doc examples/*.txt | |
108 | %{_smileysdir}/* |