2 # - better patch to find postgresql version by configure
4 # - move some files from /etc/httpd
6 %define arname mod_coffice
7 %define mod_name coffice
8 %define apxs /usr/sbin/apxs
9 %define _pkglibdir %(%{apxs} -q LIBEXECDIR)
10 %define _sysconfdir /etc/httpd
12 Summary: LeftHand 1.1 Platform
13 Summary(pl.UTF-8): Platforma LeftHand 1.1
14 Name: lefthand-platform
18 Group: Applications/WWW
20 # http://www.lefthand.com.pl/download/firma/lefthand-1.1-all.tar.gz
21 Source0: lefthand-%{version}.tar.gz
22 # Source0-md5: cba23742c2fdde1a77288ff524516450
23 Patch0: %{name}-dont_chown.patch
24 Patch1: %{name}-DESTDIR.patch
25 Patch2: %{name}-comments.patch
26 Patch3: %{name}-install.patch
27 Patch4: %{name}-ac_fix_postgres.patch
28 #Patch5: %{name}-mod_coffice.patch
29 Patch6: %{name}-postgresql.patch
30 URL: http://www.lefthand.com.pl/
31 BuildRequires: apache(EAPI)-devel >= 1.3.12
32 BuildRequires: autoconf
33 BuildRequires: automake
34 BuildRequires: js-devel
35 BuildRequires: postgresql-backend-devel
36 BuildRequires: postgresql-devel
37 BuildRequires: texinfo
38 Requires(post,preun): %{apxs}
39 Requires(post,preun): grep
40 Requires(preun): fileutils
41 Requires: apache(EAPI) >= 1.3.12
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 LeftHand Platform 1.1 is a set of libraries, utilities and
46 metodologies designed for creating applications like Firma. The
47 platform provides features like database access, Internet
48 communication layer, users and roles system and security control
51 %description -l pl.UTF-8
52 Platforma LeftHand 1.1 - zestaw bibliotek, narzędzi i metodologii do
53 tworzenia właściwych aplikacji, typu aplikacja Firma. Platforma
54 zapewnia takie elementy jak, na przykład, dostęp do bazy danych,
55 warstwę komunikacji przez Internet, system użytkowników i ról, czy
56 mechanizmy kontroli bezpieczeństwa.
71 LDFLAGS=' '; export LDFLAGS
73 --with-libs="%{_libdir}" \
74 --with-includes="%{_includedir}/js %{_includedir} %{_includedir}/postgresql/server %{_includedir}/postgresql/internal" \
75 --with-postgresql="%{_prefix}" \
76 --with-postgresql-inc="%{_includedir}/postgresql" \
77 --with-apachectl="%{_sbindir}/httpd " \
78 --with-apachectl="/etc/rc.d/init.d/httpd" \
79 --with-apache-libexecdir="%{_pkglibdir}" \
80 --with-database="http"
82 #%{__make} -C comodules clean
83 #%{__make} -C coffice clean
86 rm -rf $RPM_BUILD_ROOT
87 %{__make} -C comodules install DESTDIR="$RPM_BUILD_ROOT"
88 %{__make} -C coffice install DESTDIR="$RPM_BUILD_ROOT"
90 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_includedir}/co,/opt/co/html,/opt/co/datafiles/sys/attachment,/opt/co/datafiles/sys/text_document}
91 install coffice/mod_coffice.so $RPM_BUILD_ROOT%{_pkglibdir}
92 install config/co.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{arname}.conf
93 install include/*.h $RPM_BUILD_ROOT%{_includedir}/co
94 cp -a http_root/* $RPM_BUILD_ROOT/opt/co/html
95 cd $RPM_BUILD_ROOT%{_sysconfdir}
96 ln -sf ../../opt/co/html co_root
97 ln -sf ../../opt/co/datafiles co_data
100 rm -rf $RPM_BUILD_ROOT
103 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
104 if [ -f %{_sysconfdir}/httpd.conf ] && \
105 ! grep -q "^Include.*/%{arname}.conf" %{_sysconfdir}/httpd.conf; then
106 echo "Include %{_sysconfdir}/%{arname}.conf" >>%{_sysconfdir}/httpd.conf
108 if [ -f /var/lock/subsys/httpd ]; then
109 /etc/rc.d/init.d/httpd restart 1>&2
113 if [ "$1" = "0" ]; then
114 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
116 grep -E -v "^Include.*%{arname}.conf" %{_sysconfdir}/httpd.conf > \
117 %{_sysconfdir}/httpd.conf.tmp
118 mv -f %{_sysconfdir}/httpd.conf.tmp %{_sysconfdir}/httpd.conf
119 if [ -f /var/lock/subsys/httpd ]; then
120 /etc/rc.d/init.d/httpd restart 1>&2
125 %defattr(644,root,root,755)
128 %attr(755,postgres,postgres) %{_libdir}/co/fsql_catalog.so
129 %dir %{_sysconfdir}/co_javascript
130 %{_sysconfdir}/co_javascript/*.js
131 %dir %{_sysconfdir}/co_modules
132 %{_sysconfdir}/co_modules/*.so
133 %{_sysconfdir}/co_root
134 %{_sysconfdir}/co_data
136 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{arname}.conf
141 %dir /opt/co/datafiles
142 %dir /opt/co/datafiles/sys
143 %attr(755,http,http) /opt/co/datafiles/sys/attachment
144 %attr(755,http,http) /opt/co/datafiles/sys/text_document