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