]>
Commit | Line | Data |
---|---|---|
9e8d9d27 | 1 | # TODO: |
2637a487 | 2 | # - Package icu-sword and add bcond for it here |
e937b4c4 | 3 | # |
4 | # Conditional build: | |
2637a487 | 5 | #%bcond_with icusword |
2637a487 CM |
6 | %bcond_without clucene |
7 | %bcond_without curl | |
8 | %bcond_without icu | |
9 | %bcond_without utilities | |
9e8d9d27 | 10 | |
e937b4c4 | 11 | %define debug_package 0 |
12 | ||
9e8d9d27 CM |
13 | Summary: The SWORD Project framework for manipulating Bible texts |
14 | Name: sword | |
21c6568e | 15 | Version: 1.6.2 |
ca08c351 | 16 | Release: 12 |
9e8d9d27 CM |
17 | License: GPL |
18 | Group: Libraries | |
19 | Source0: http://www.crosswire.org/ftpmirror/pub/sword/source/v1.6/%{name}-%{version}.tar.gz | |
21c6568e | 20 | # Source0-md5: a7dc4456e20e915fec46d774b690e305 |
1a93d102 | 21 | Patch0: %{name}-curl.patch |
a8e5c9fc JR |
22 | Patch1: %{name}-gcc47.patch |
23 | Patch2: %{name}-clucene2.patch | |
9e8d9d27 | 24 | URL: http://www.crosswire.org/sword |
f83c9fd0 | 25 | BuildRequires: pakchois-devel |
0879d3a4 | 26 | BuildRequires: pkgconfig |
f83c9fd0 | 27 | BuildRequires: sqlite3-devel |
0879d3a4 | 28 | BuildRequires: xulrunner-devel >= 1.9.2.3 |
2637a487 CM |
29 | %{?with_clucene:BuildRequires: clucene-core-devel} |
30 | %{?with_clucene:Requires: clucene-core} | |
31 | %{?with_curl:BuildRequires: curl-devel} | |
32 | %{?with_curl:Requires: curl} | |
33 | %{?with_icu:BuildRequires: icu} | |
8f244d31 | 34 | %{?with_icu:BuildRequires: libicu-devel} |
2637a487 CM |
35 | %{?with_icu:Requires: icu} |
36 | #%{?with_icusword:BuildRequires: icu-sword} | |
37 | #%{?with_icusword:Requires: icu-sword} | |
0879d3a4 | 38 | Requires: xulrunner >= 1.9.2.3 |
9e8d9d27 CM |
39 | Requires: zlib |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
41 | ||
42 | %description | |
b4a0907c CM |
43 | The SWORD Project creats cross-platform open-source tools that allow |
44 | programmers and Bible societies to write new Bible software more | |
45 | quickly and easily. The SWORD Bible Framework allows easy manipulation | |
46 | of Bible texts, commentaries, lexicons, dictionaries, etc. Many | |
47 | frontends are built using this framework. An installed module set may | |
48 | be shared between any frontend using the framework. | |
9e8d9d27 | 49 | |
2637a487 | 50 | %package utilities |
b4a0907c | 51 | Summary: Utility programs that use the sword libraries |
2637a487 | 52 | Group: Applications |
2637a487 | 53 | Requires: %{name} = %{version}-%{release} |
b4a0907c | 54 | Provides: diatheke |
2637a487 CM |
55 | |
56 | %description utilities | |
b4a0907c | 57 | Utility programs that use the sword libraries. |
2637a487 | 58 | |
9e8d9d27 CM |
59 | %package devel |
60 | Summary: Include files and static libraries for developing sword applications | |
61 | Group: Development/Libraries | |
2637a487 | 62 | Requires: %{name} = %{version}-%{release} |
b4a0907c | 63 | Requires: curl-devel >= 7.10.5 |
9e8d9d27 CM |
64 | Requires: zlib-devel |
65 | ||
66 | %description devel | |
67 | Include files and static libraries for developing sword applications. | |
68 | This package is required to compile Sword frontends, too. | |
69 | ||
70 | %prep | |
71 | %setup -q | |
1a93d102 CM |
72 | %if %{with_curl} |
73 | %patch0 -p0 | |
74 | %endif | |
a8e5c9fc JR |
75 | %patch1 -p0 |
76 | %patch2 -p1 | |
9e8d9d27 CM |
77 | |
78 | %build | |
79 | %{configure} \ | |
20289b0b | 80 | --with-conf \ |
2637a487 CM |
81 | --with%{!?with_clucene:out}-clucene \ |
82 | --with%{!?with_curl:out}-curl \ | |
83 | --with%{!?with_icu:out}-icu \ | |
9e8d9d27 | 84 | --disable-debug \ |
20289b0b CM |
85 | --disable-dependency-tracking \ |
86 | --disable-examples \ | |
87 | --disable-tests \ | |
88 | --%{?with_utilities:en}%{!?with_utilities:dis}able-utilities \ | |
2637a487 | 89 | #--with%{!?with_icusword:out}-icusword \ |
9e8d9d27 CM |
90 | |
91 | %{__make} | |
92 | ||
93 | %install | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %{__make} install-strip \ | |
97 | DESTDIR=$RPM_BUILD_ROOT | |
98 | ||
99 | %{__make} install_config \ | |
100 | DESTDIR=$RPM_BUILD_ROOT | |
101 | ||
102 | install -d $RPM_BUILD_ROOT%{_libdir}/sword | |
103 | exit 0 | |
104 | ||
105 | %post devel -p /sbin/ldconfig | |
106 | ||
107 | %postun devel -p /sbin/ldconfig | |
108 | ||
109 | %files | |
110 | %defattr(644,root,root,755) | |
111 | %config %{_sysconfdir}/sword.conf | |
2637a487 CM |
112 | %dir %{_datadir}/sword |
113 | %dir %{_datadir}/sword/mods.d | |
114 | %dir %{_datadir}/sword/locales.d | |
9e8d9d27 CM |
115 | %config %{_datadir}/sword/mods.d/globals.conf |
116 | %config %{_datadir}/sword/locales.d/*.conf | |
117 | %doc README AUTHORS NEWS INSTALL | |
118 | %attr(755,root,root) %{_libdir}/libsword*.so* | |
119 | %dir %{_libdir}/sword | |
2637a487 | 120 | %dir %{_libdir}/sword/*icu* |
9e8d9d27 CM |
121 | %{_libdir}/sword/*/*.res |
122 | ||
2637a487 CM |
123 | %files utilities |
124 | %defattr(644,root,root,755) | |
125 | %attr(755,root,root) %{_bindir}/* | |
126 | ||
9e8d9d27 CM |
127 | %files devel |
128 | %defattr(644,root,root,755) | |
129 | %doc doc/* | |
130 | %{_pkgconfigdir}/sword.pc | |
131 | %{_includedir}/sword | |
132 | %{_libdir}/libsword*.*a | |
133 | ||
134 | %clean | |
135 | rm -rf $RPM_BUILD_ROOT |