]>
Commit | Line | Data |
---|---|---|
e927064c | 1 | # |
2 | Summary: EmotIcons | |
3 | Name: emoticons | |
4 | Version: 0.1 | |
5 | Release: 0.1 | |
6 | License: GPL ? | |
7 | Group: Applications/Communications | |
8 | Source0: %{name}-gg-031212.tgz | |
9 | URL: http://www.gadu.gnu.pl/ | |
10 | BuildRequires: ImageMagick-coder-png | |
11 | BuildRequires: iconv | |
12 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
13 | ||
14 | %description | |
15 | EmoteIcons | |
16 | ||
17 | %package -n emoticons-kopete-gg | |
18 | Summary: Gadu-Gadu emoticons for kopete | |
19 | Group: X11/Applications/Networking | |
20 | Requires: kdenetwork-kopete | |
21 | ||
22 | %description -n emoticons-kopete-gg | |
23 | Gadu-Gadu emoticons for kopete | |
24 | ||
25 | %prep | |
26 | %setup -Tcqn %{name} -a0 | |
27 | ||
28 | %build | |
29 | gcc -o conv conv.c | |
30 | ||
31 | rm -rf out; mkdir out | |
32 | # oryginal emots/2/emots.txt have some errors :( | |
33 | cat emots/2/emots.txt | \ | |
34 | sed 's/<soczek>,/<soczek>"/' | \ | |
35 | sed 's:("<marzyciel>","oczy.gif"):"<marzyciel>","oczy.gif":' \ | |
36 | > emots/2/emotsnew.txt | |
37 | rm -f emots/2/emots.txt | |
38 | ||
39 | FILES=`find emots -type f -iname "*.txt"` | |
40 | cat $FILES > emots.txt | |
41 | ||
42 | echo -e -n "<?xml version=\"1.0\"?>\n<messaging-emoticon-map>\n\n" > emoticons.xml.tmp | |
43 | ./conv emots.txt >> emoticons.xml.tmp | |
44 | echo -e -n "</messaging-emoticon-map>\n" >> emoticons.xml.tmp | |
45 | ||
46 | cat emoticons.xml.tmp | iconv -f cp1250 -t utf-8 > out/emoticons.xml | |
47 | FILES=`find emots -type f -iname "*.gif"` | |
48 | for FILE in $FILES | |
49 | do | |
50 | F=`basename $FILE | tr '[:upper:]' '[:lower:]'` | |
51 | cp $FILE out/$F | |
52 | done | |
53 | convert out/wesoly_na.gif out/smile.png | |
54 | rm -f out/*_na.* | |
55 | ||
56 | %install | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | install -d $RPM_BUILD_ROOT%{_datadir}/apps/kopete/pics/emoticons/Gadu-Gadu/ | |
60 | cp out/* $RPM_BUILD_ROOT%{_datadir}/apps/kopete/pics/emoticons/Gadu-Gadu/ | |
61 | ||
62 | %clean | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %files -n emoticons-kopete-gg | |
66 | %defattr(644,root,root,755) | |
67 | %{_datadir}/apps/kopete/pics/emoticons/Gadu-Gadu/* |