/[packages]/cauldron/hunspell-no/current/SPECS/hunspell-no.spec
ViewVC logotype

Contents of /cauldron/hunspell-no/current/SPECS/hunspell-no.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 206246 - (show annotations) (download)
Wed Feb 8 00:35:36 2012 UTC (12 years, 1 month ago) by kamil
File size: 4066 byte(s)
- adapt .spec to the current policies
1 # In case of update this package, update also mythes-no and hyphen-no - it's the same source
2
3 # This package is producting debug package, disable it
4 %define _enable_debug_packages %{nil}
5 %define debug_package %{nil}
6
7 # There is no no_NO language, there are two (main) variants Bokmaal and Nynorsk
8 # Bokmaal is much more popular than Nynorsk and therefor if there is reference
9 # for no_NO then it means nb_NO
10
11 %define languageenglazy Norwegian
12 %define languagecode no
13 %define lc_ctype no_NO
14
15 Name: hunspell-%{languagecode}
16 Version: 2.0.10
17 Release: %mkrel 12
18 Summary: %{languageenglazy} hunspell dictionaries
19 License: GPL+
20 Group: System/Internationalization
21 URL: http://spell-norwegian.alioth.debian.org
22 Source0: http://alioth.debian.org/frs/download.php/2357/no_NO-pack2-%{version}.zip
23
24 %description
25 %{languageenglazy} hunspell dictionaries.
26
27 %package -n hunspell-nb
28 Summary: Bokmaal hunspell dictionaries
29 Group: System/Internationalization
30 BuildArch: noarch
31
32 Suggests: hunspell
33
34 #Mageia values: 1 - aspell, 2 - hunspell, 3 - language specific
35 Provides: enchant-dictionary = 2
36 Provides: hunspell-dictionary
37 Provides: hunspell-nb_NO = %{version}-%{release}
38 Provides: hunspell-no_NO = %{version}-%{release}
39 #Generic providing - see Mageia values
40 Provides: dictionary-%{languagecode} = 2
41 Provides: dictionary-nb_NO = 2
42 Provides: dictionary-%{lc_ctype} = 2
43
44 #MySpell is deprecated
45 Obsoletes: myspell-%{languagecode} <= 1.0.2-30
46 Provides: myspell-%{languagecode}
47 Obsoletes: myspell-nb_NO <= 1.0.2-30
48 Provides: myspell-nb_NO
49
50 AutoReqProv: no
51
52 %description -n hunspell-nb
53 Bokmaal hunspell dictionaries.
54
55
56 %package -n hunspell-nn
57 Summary: Nynorsk hunspell dictionaries
58 Group: System/Internationalization
59 BuildArch: noarch
60
61 Suggests: hunspell
62
63 #Mageia values: 1 - aspell, 2 - hunspell, 3 - language specific
64 Provides: enchant-dictionary = 2
65 Provides: hunspell-dictionary
66 Provides: hunspell-nn_NO = %{version}-%{release}
67 #Generic providing - see Mageia values
68 Provides: dictionary-nn_NO = 2
69
70 #MySpell is deprecated
71 Obsoletes: myspell-nn_NO <= 1.0.2-30
72 Provides: myspell-nn_NO
73
74 AutoReqProv: no
75
76 %description -n hunspell-nn
77 Bokmaal hunspell dictionaries.
78
79
80 %prep
81 %setup -q -c
82
83 %build
84 unzip -q nb_NO.zip
85 unzip -q nn_NO.zip
86 for i in README_nb_NO.txt README_nn_NO.txt; do
87 if ! iconv -f utf-8 -t utf-8 -o /dev/null $i > /dev/null 2>&1; then
88 iconv -f ISO-8859-1 -t UTF-8 $i > $i.new
89 touch -r $i $i.new
90 mv -f $i.new $i
91 fi
92 tr -d '\r' < $i > $i.new
93 touch -r $i $i.new
94 mv -f $i.new $i
95 done
96
97 %install
98 # nb_NO
99 install -D -m 0644 -p nb_NO.dic %{buildroot}%{_datadir}/hunspell/nb_NO.dic
100 install -D -m 0644 -p nb_NO.aff %{buildroot}%{_datadir}/hunspell/nb_NO.aff
101
102 nb_NO_aliases="%{lc_ctype}"
103 pushd %{buildroot}%{_datadir}/hunspell
104 for lang in $nb_NO_aliases
105 do
106 ln -s nb_NO.aff $lang.aff
107 ln -s nb_NO.dic $lang.dic
108 done
109 popd #%%{buildroot}%%{_datadir}/hunspell
110
111 #backward compatibility
112 mkdir -p %{buildroot}%{_datadir}/myspell
113 pushd %{buildroot}%{_datadir}/myspell
114 ln -s ../hunspell/nb_NO.dic nb_NO.dic
115 ln -s ../hunspell/nb_NO.aff nb_NO.aff
116
117 for lang in $nb_NO_aliases
118 do
119 ln -s ../hunspell/$lang.dic $lang.dic
120 ln -s ../hunspell/$lang.aff $lang.aff
121 done
122 popd #%%{buildroot}%%{_datadir}/myspell
123
124 # nn_NO
125 install -D -m 0644 -p nn_NO.dic %{buildroot}%{_datadir}/hunspell/nn_NO.dic
126 install -D -m 0644 -p nn_NO.aff %{buildroot}%{_datadir}/hunspell/nn_NO.aff
127
128 #backward compatibility
129 mkdir -p %{buildroot}%{_datadir}/myspell
130 pushd %{buildroot}%{_datadir}/myspell
131 ln -s ../hunspell/nn_NO.dic nn_NO.dic
132 ln -s ../hunspell/nn_NO.aff nn_NO.aff
133 popd #%%{buildroot}%%{_datadir}/myspell
134
135 %files -n hunspell-nb
136 %doc README_nb_NO.txt
137 %{_datadir}/hunspell/n[ob]*
138 %{_datadir}/myspell/n[ob]*
139
140 %files -n hunspell-nn
141 %doc README_nn_NO.txt
142 %{_datadir}/hunspell/nn*
143 %{_datadir}/myspell/nn*

  ViewVC Help
Powered by ViewVC 1.1.30