]> git.pld-linux.org Git - packages/dgee.git/blob - dgee.spec
28c3824edd6a10754849be4b57c95a38914321f6
[packages/dgee.git] / dgee.spec
1 #
2 # TODO: 
3 #  --without apache1 (default) should build mod_dgee.so for 
4 #  apache2 - it doesn't
5
6
7 %bcond_with     apache1
8 %define         apxs    /usr/sbin/apxs
9 %define         _rel    2
10 Summary:        The DotGNU Execution Environment Core
11 Summary(pl):    Podstawa ¶rodowiska wykonawczego DotGNU
12 Name:           dgee
13 Version:        0.1.6
14 Release:        %{_rel}.0.3
15 License:        GPL
16 Group:          Networking/Daemons
17 Source0:        http://www.nfluid.com/download/src/%{name}-%{version}-%{_rel}.tgz
18 # Source0-md5:  a2573a076832c4c7212479cabda15eff
19 Source1:        %{name}.init
20 Source2:        %{name}.logrotate
21 Patch0:         %{name}-DESTDIR.patch
22 Patch1:         %{name}-apache.patch
23 Patch2:         %{name}-dglib_fix_so.patch
24 Patch3:         %{name}-pythonvm.patch
25 Patch4:         %{name}-pic.patch
26 Patch5:         %{name}-nolibnsl.patch
27 URL:            http://www.dotgnu.org/dgee.html
28 BuildRequires:  apache-devel
29 BuildRequires:  autoconf >= 2.13
30 BuildRequires:  automake
31 BuildRequires:  expat-devel
32 BuildRequires:  goldwater-devel => 0.3.4
33 BuildRequires:  phlib-devel => 1.20
34 BuildRequires:  pnet-devel => 0.6.0-2
35 BuildRequires:  %{apxs}
36 Requires(post): /sbin/ldconfig
37 Requires(post,preun):   %{apxs}
38 Requires(post,preun):   /sbin/chkconfig
39 Requires:       apache
40 Requires:       goldwater
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 The core DotGNU Execution Environment that provides the functionality
45 of accepting, validating and satisfying web service requests.
46
47 %description -l pl
48 Ten pakiet zawiera podstawê ¶rodowiska wykonawczego DotGNU (DotGNU
49 Execution Environment) dostarczaj±c± funkcjonalno¶æ przyjmowania,
50 sprawdzania poprawno¶ci i wykonywania ¿±dañ us³ug WWW.
51
52 %prep
53 %setup -q
54 %patch0 -p1
55 %patch1 -p1
56 %patch2 -p1
57 %patch3 -p1
58 %patch4 -p1
59 %patch5 -p1
60
61 %build
62 %{__aclocal}
63 %{__autoconf}
64 %{__autoheader}
65 %{__automake}
66 %configure \
67         cflags=our \
68         --with-goldwater=%{_prefix} \
69         --with-pnet=%{_prefix} \
70         --with-repository=/var/lib/%{name} \
71         --with-username=http \
72         --with-usergroup=http \
73         --with-python \
74 %if %{with apache1}
75         --with-apache=%{_prefix}
76 %else
77         --without-apache \
78         --with-apache2=%{_prefix}
79 %endif
80
81 %if %{with apache1}
82 %{__make} 
83 %else
84 %{__make} \
85         APACHE=
86 %endif
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with apache1}
92 %{__make} install \
93         DESTDIR=$RPM_BUILD_ROOT 
94 %else
95 %{__make} install \
96         DESTDIR=$RPM_BUILD_ROOT \
97         APACHE=
98 %endif
99
100 # Thise files should be installed by Makefile (I can't fix it):
101 install cslib/DotGNU/DGEE/DotGNU.DGEE.dll \
102         $RPM_BUILD_ROOT%{_libdir}/%{name}
103 install cslib/System/Web/Services/System.Web.Services.dll \
104         $RPM_BUILD_ROOT%{_libdir}/%{name}
105 install cslib/DotGNU/DGEE/Protocols/XmlRpc/XmlRpcService.exe \
106         $RPM_BUILD_ROOT%{_libdir}/%{name}
107
108 install -d $RPM_BUILD_ROOT/var/lib/%{name}/{index,data}
109 install -d $RPM_BUILD_ROOT/var/log/%{name}
110 touch $RPM_BUILD_ROOT/var/log/%{name}/{%{name}.log,stdout,stderr}
111 install -d $RPM_BUILD_ROOT/var/log/archiv/%{name}
112 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
113 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
114 install -d $RPM_BUILD_ROOT/etc/logrotate.d
115 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %post
121 /sbin/ldconfig
122 %if %{with apache1}
123 if [ -f /etc/httpd/httpd.conf ] && \
124     ! grep -q "^Include.*/mod_dgee.conf" /etc/httpd/httpd.conf; then
125         echo "Include /etc/httpd/mod_dgee.conf" >> /etc/httpd/httpd.conf
126 fi
127 %endif
128
129 %{apxs} -e -a -n dgee %{_pkglibdir}/mod_dgee.so 1>&2
130 if [ -f /var/lock/subsys/httpd ]; then
131         /etc/rc.d/init.d/httpd restart 1>&2
132 fi
133
134 if [ -f /var/lock/subsys/dgee ]; then
135         /etc/rc.d/init.d/dgee restart 1>&2
136 else
137         echo "Run \"/etc/rc.d/init.d/dgee start\" to start goltwater and dgee services."
138 fi
139 /sbin/chkconfig --add dgee
140
141 %preun
142 if [ "$1" = "0" ]; then
143 %if %{with apache1}
144         umask 027
145         grep -E -v "^Include.*/mod_dgee.conf" /etc/httpd/httpd.conf > \
146                 /etc/httpd/httpd.conf.tmp
147         mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
148 %endif
149         %{apxs} -e -A -n dgee %{_pkglibdir}/mod_dgee.so 1>&2
150         if [ -f /var/lock/subsys/httpd ]; then
151                 /etc/rc.d/init.d/httpd restart 1>&2
152         fi
153         if [ -f /var/lock/subsys/dgee ]; then
154                 /etc/rc.d/init.d/dgee stop 1>&2
155         fi
156         /sbin/chkconfig --del dgee
157 fi
158
159 %postun -p /sbin/ldconfig
160
161 %files
162 %defattr(644,root,root,755)
163 %doc BINARYINSTALL INSTALL QUICKSTART README
164 %attr(755,root,root) %{_bindir}/*
165 %attr(755,root,root) %{_libdir}/libdgee.so.*.*
166 %attr(755,root,root) %{_libdir}/libdgxml.so.*.*
167 %dir %{_libdir}/%{name}
168 %attr(755,root,root) %{_libdir}/%{name}/*
169 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}*
170 %if %{with apache1}
171 %config %verify(not size mtime md5) %{_sysconfdir}/httpd/mod_%{name}.conf
172 %{_libdir}/apache/mod_%{name}.so
173 %else
174 #%config %{_sysconfdir}/httpd/mod_%{name}.conf
175 #%{_libdir}/apache/mod_%{name}.so
176 %endif
177 %{_datadir}/%{name}
178 /var/lib/%{name}
179 %attr(754,root,root) /etc/rc.d/init.d/%{name}
180 %attr(730,root,http) %dir /var/log/%{name}
181 %attr(660,root,http) /var/log/%{name}/*
182 %attr(750,root,root) %dir /var/log/archiv/%{name}
183 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/*
This page took 0.035092 seconds and 3 git commands to generate.