]> git.pld-linux.org Git - packages/sword.git/blob - sword.spec
821e890eaf7e82bddcbc27a2ac918dbf1a3b4845
[packages/sword.git] / sword.spec
1 # TODO:
2 # - Package icu-sword and add bcond for it here
3 #
4 # Conditional build:
5 #%bcond_with    icusword
6 %bcond_without  clucene
7 %bcond_without  curl
8 %bcond_without  icu
9 %bcond_without  utilities
10
11 %define debug_package 0
12
13 Summary:        The SWORD Project framework for manipulating Bible texts
14 Name:           sword
15 Version:        1.6.2
16 Release:        8
17 License:        GPL
18 Group:          Libraries
19 Source0:        http://www.crosswire.org/ftpmirror/pub/sword/source/v1.6/%{name}-%{version}.tar.gz
20 # Source0-md5:  a7dc4456e20e915fec46d774b690e305
21 Patch0:         %{name}-curl.patch
22 Patch1:         %{name}-gcc47.patch
23 Patch2:         %{name}-clucene2.patch
24 URL:            http://www.crosswire.org/sword
25 BuildRequires:  pakchois-devel
26 BuildRequires:  pkgconfig
27 BuildRequires:  sqlite3-devel
28 BuildRequires:  xulrunner-devel >= 1.9.2.3
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}
34 %{?with_icu:BuildRequires:      libicu-devel}
35 %{?with_icu:Requires:   icu}
36 #%{?with_icusword:BuildRequires:        icu-sword}
37 #%{?with_icusword:Requires:     icu-sword}
38 Requires:       xulrunner >= 1.9.2.3
39 Requires:       zlib
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
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.
49
50 %package utilities
51 Summary:        Utility programs that use the sword libraries
52 Group:          Applications
53 Requires:       %{name} = %{version}-%{release}
54 Provides:       diatheke
55
56 %description utilities
57 Utility programs that use the sword libraries.
58
59 %package devel
60 Summary:        Include files and static libraries for developing sword applications
61 Group:          Development/Libraries
62 Requires:       %{name} = %{version}-%{release}
63 Requires:       curl-devel >= 7.10.5
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
72 %if %{with_curl}
73 %patch0 -p0
74 %endif
75 %patch1 -p0
76 %patch2 -p1
77
78 %build
79 %{configure} \
80         --with-conf \
81         --with%{!?with_clucene:out}-clucene \
82         --with%{!?with_curl:out}-curl \
83         --with%{!?with_icu:out}-icu \
84         --disable-debug \
85         --disable-dependency-tracking \
86         --disable-examples \
87         --disable-tests \
88         --%{?with_utilities:en}%{!?with_utilities:dis}able-utilities \
89         #--with%{!?with_icusword:out}-icusword \
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
112 %dir %{_datadir}/sword
113 %dir %{_datadir}/sword/mods.d
114 %dir %{_datadir}/sword/locales.d
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
120 %dir %{_libdir}/sword/*icu*
121 %{_libdir}/sword/*/*.res
122
123 %files utilities
124 %defattr(644,root,root,755)
125 %attr(755,root,root) %{_bindir}/*
126
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
This page took 0.049039 seconds and 2 git commands to generate.