]> git.pld-linux.org Git - SPECS.git/blob - lefthand-platform.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / lefthand-platform.spec
1 # TODO:
2 # - better patch to find postgresql version by configure
3 # - group
4 # - move some files from /etc/httpd
5
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
11
12 Summary:        LeftHand 1.1 Platform
13 Summary(pl.UTF-8):      Platforma LeftHand 1.1
14 Name:           lefthand-platform
15 Version:        1.1
16 Release:        0.3
17 License:        GPL
18 Group:          Applications/WWW
19 # extracted from
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)
43
44 %description
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
49 mechanisms.
50
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.
57
58 %prep
59 %setup -q -n co
60 %patch0 -p1
61 %patch1 -p1
62 %patch2 -p1
63 %patch3 -p1
64 %patch4 -p1
65 #%patch5        -p1
66 %patch6 -p1
67
68 %build
69 %{__aclocal}
70 %{__autoconf}
71 LDFLAGS=' '; export LDFLAGS
72 %configure \
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"
81
82 #%{__make} -C comodules clean
83 #%{__make} -C coffice clean
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87 %{__make} -C comodules install DESTDIR="$RPM_BUILD_ROOT"
88 %{__make} -C coffice install DESTDIR="$RPM_BUILD_ROOT"
89
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
98
99 %clean
100 rm -rf $RPM_BUILD_ROOT
101
102 %post
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
107 fi
108 if [ -f /var/lock/subsys/httpd ]; then
109         /etc/rc.d/init.d/httpd restart 1>&2
110 fi
111
112 %preun
113 if [ "$1" = "0" ]; then
114         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
115         umask 027
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
121         fi
122 fi
123
124 %files
125 %defattr(644,root,root,755)
126 #%doc sql
127 %dir %{_libdir}/co
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
135 %{_pkglibdir}/*.so
136 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{arname}.conf
137 # FIXME: FHS
138 #/sql
139 %{_includedir}/co
140 %dir /opt/co
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
145 /opt/co/html
This page took 0.420424 seconds and 3 git commands to generate.