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

Diff of /cauldron/hunspell-bn/current/SPECS/hunspell-bn.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 196812 by dmorgan, Sat Mar 12 15:08:00 2011 UTC revision 196813 by kamil, Mon Jan 16 11:18:10 2012 UTC
# Line 1  Line 1 
1  %define upstreamver 0.04  %define languageenglazy Bengali
2    %define languagecode    bn
3    %define lc_ctype        bn_BD
4    
5    Name:           hunspell-%{languagecode}
6    Epoch:          1
7    Version:        0.04
8    Release:        %mkrel 2
9    Summary:        %{languageenglazy} hunspell dictionaries
10    License:        GPLv2+
11    Group:          System/Internationalization
12    URL:            http://ankur.org.bd/wiki
13    Source0:        http://sourceforge.net/projects/bengalinux/files/bengali-spellcheck/%{name}-%{version}.tar.bz2
14    
15    BuildArch:      noarch
16    
17    Suggests:       hunspell
18    
19    #Mageia values: 1 - aspell, 2 - hunspell, 3 - language specific
20    Provides:       enchant-dictionary = 2
21    Provides:       hunspell-dictionary
22    Provides:       hunspell-%{lc_ctype} = %{version}-%{release}
23    Provides:       hunspell-bn_IN = %{version}-%{release}
24    #Generic providing - see Mageia values
25    Provides:       dictionary-%{languagecode} = 2
26    Provides:       dictionary-%{lc_ctype} = 2
27    Provides:       dictionary-bn_IN = 2
28    
29    #MySpell is deprecated
30    Obsoletes:      myspell-%{languagecode} <= 1.0.2-30
31    Provides:       myspell-%{languagecode}
32    Obsoletes:      myspell-%{lc_ctype} <= 1.0.2-30
33    Provides:       myspell-%{lc_ctype}
34    
35  Name: hunspell-bn  AutoReqProv:    no
 Summary: Bengali hunspell dictionaries  
 Version: %{upstreamver}  
 Release: %mkrel 1  
 Epoch: 1  
 Group:          Text tools  
 Source: http://sourceforge.net/projects/bengalinux/files/bengali-spellcheck/%{name}-%{version}.tar.bz2  
 URL: http://ankur.org.bd/wiki  
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root  
 License: GPLv2+  
 BuildArch: noarch  
   
 Requires: hunspell  
36    
37  %description  %description
38  Bengali hunspell dictionaries.  %{languageenglazy} hunspell dictionaries.
39    
40    
41  %prep  %prep
42  %setup -q -n %{name}-%{upstreamver}  %setup -q
43    
44    %build
45  chmod -x bn.aff  bn.dic  COPYING  Copyright README  chmod -x bn.aff  bn.dic  COPYING  Copyright README
46  chmod -x doc/README  chmod -x doc/README
47  mv bn.aff bn_BD.aff  mv bn.aff bn_BD.aff
# Line 31  for file in Copyright doc/README; do Line 54  for file in Copyright doc/README; do
54      mv $file.new $file      mv $file.new $file
55  done  done
56    
   
 %build  
   
57  %install  %install
58  rm -rf $RPM_BUILD_ROOT  install -D -m 0644 -p *.dic %{buildroot}%{_datadir}/hunspell/%{lc_ctype}.dic
59  mkdir -p $RPM_BUILD_ROOT/%{_datadir}/myspell  install -D -m 0644 -p *.aff %{buildroot}%{_datadir}/hunspell/%{lc_ctype}.aff
 cp -p *.dic *.aff $RPM_BUILD_ROOT/%{_datadir}/myspell  
60    
 pushd $RPM_BUILD_ROOT/%{_datadir}/myspell/  
61  bn_BD_aliases="bn_IN"  bn_BD_aliases="bn_IN"
62  for lang in $bn_BD_aliases; do  pushd %{buildroot}%{_datadir}/hunspell
63          ln -s bn_BD.aff $lang.aff      for lang in $bn_BD_aliases
64          ln -s bn_BD.dic $lang.dic      do
65  done          ln -s %{lc_ctype}.aff $lang.aff
66  popd          ln -s %{lc_ctype}.dic $lang.dic
67        done
68  %clean  popd #%%{buildroot}%%{_datadir}/hunspell
69  rm -rf $RPM_BUILD_ROOT  
70    #backward compatibility
71    mkdir -p %{buildroot}%{_datadir}/myspell
72    pushd %{buildroot}%{_datadir}/myspell
73        ln -s ../hunspell/%{lc_ctype}.dic %{lc_ctype}.dic
74        ln -s ../hunspell/%{lc_ctype}.aff %{lc_ctype}.aff
75    
76        for lang in $bn_BD_aliases
77        do
78            ln -s ../hunspell/$lang.dic $lang.dic
79            ln -s ../hunspell/$lang.aff $lang.aff
80        done
81    popd #%%{buildroot}%%{_datadir}/myspell
82    
83  %files  %files
 %defattr(-,root,root,-)  
84  %doc doc/README COPYING Copyright  %doc doc/README COPYING Copyright
85    %{_datadir}/hunspell/*
86  %{_datadir}/myspell/*  %{_datadir}/myspell/*
   

Legend:
Removed from v.196812  
changed lines
  Added in v.196813

  ViewVC Help
Powered by ViewVC 1.1.30