]> git.pld-linux.org Git - packages/apache-mod_mono.git/blob - apache-mod_mono.spec
- unified (untested)
[packages/apache-mod_mono.git] / apache-mod_mono.spec
1 #
2 # TODO:
3 # - figure out how to kill mod-mono-server.exe process
4 #   when apache is restarted
5 #
6 %define         mod_name        mono
7 %define         apxs            /usr/sbin/apxs
8 Summary:        Mono module for Apache 2
9 Summary(pl):    Modu³ Mono dla serwera Apache 2
10 Name:           apache-mod_%{mod_name}
11 Version:        1.0.1
12 Release:        0.9
13 Epoch:          1
14 License:        Apache
15 Group:          Networking/Daemons
16 Source0:        http://mono2.ximian.com/archive/%{version}/%{mod_name}-%{version}.tar.gz
17 # Source0-md5:  5adb398b270865c484cea53b79e3def4
18 Patch0:         %{name}-apu-config.patch
19 URL:            http://www.mono-project.com/
20 BuildRequires:  apache-devel >= 2.0
21 BuildRequires:  %{apxs}
22 BuildRequires:  autoconf
23 BuildRequires:  automake
24 BuildRequires:  libtool
25 BuildRequires:  mono-csharp >= 1.0
26 Requires:       xsp
27 Requires:       apache >= 2.0
28 Requires:       mono-csharp >= 1.0
29 Obsoletes:      mod_mono
30 ExcludeArch:    alpha
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %define         _httpdir        /home/services/httpd
34 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
35 %define         _pkglibdir      %(%{apxs} -q SYSCONFDIR)
36
37 %description
38 This is an experimental module that allows you to run ASP.NET pages on
39 Unix with Apache and Mono.
40
41 %description -l pl
42 Ten eksperymentalny modu³ umo¿liwia uruchamianie stron ASP.NET na
43 Uniksie z serwerem Apache i Mono.
44
45 %package -n dotnet-xsp
46 Summary:        Mono ASP.NET Standalone Web Server
47 Summary(pl):    Server HTTP obs³uguj±cy ASP.NET
48 Group:          Networking/Daemons
49 Requires:       %{name} = %{epoch}:%{version}-%{release}
50 Requires:       mono-csharp >= 1.0
51
52 %description -n dotnet-xsp
53 Provides a minimalistic web server which hosts the ASP.NET runtime and 
54 can be used to test and debug web applications that use the System.Web
55 facilities in  Mono.
56
57 %prep
58 %setup -q -n %{mod_name}-%{version}
59 %patch0 -p1
60
61 %build
62 rm -rf $RPM_BUILD_ROOT
63 # Build Apache Module
64 %{__libtoolize}
65 %{__aclocal}
66 %{__autoconf}
67 %{__automake}
68
69 %configure \
70         --with-apxs=%{apxs} \
71         --with-apr-config=%{_bindir}/apr-config \
72         --with-apu-config=%{_bindir}/apu-config
73
74 %{__make} \
75         DESTDIR=$RPM_BUILD_ROOT
76
77 # Build Mono DLL
78 %{__make} -C src -f makedll.mak
79
80 %install
81 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/httpd.conf,%{_pkglibdir},%{_mandir}/man8}
82
83 install src/.libs/libmod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
84 install src/ModMono.dll $RPM_BUILD_ROOT%{_libdir}
85 install man/mod_%{mod_name}.8 $RPM_BUILD_ROOT%{_mandir}/man8
86
87 cat > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_mod_%{mod_name}.conf <<EOF
88 LoadModule mono_module modules/mod_%{mod_name}.so
89 MonoApplications "/asp_net:%{_httpdir}/asp_net"
90 Alias /asp_net "%{_httpdir}/asp_net"
91 <Location /asp_net>
92     SetHandler mono
93 </Location>
94 EOF
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %files
100 %defattr(644,root,root,755)
101 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd.conf/*
102 %doc ChangeLog INSTALL NEWS README
103 %attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so
104 %attr(755,root,root) %{_libdir}/ModMono.dll
105 %{_mandir}/man8/*
This page took 0.056727 seconds and 4 git commands to generate.