This repository has been archived by the owner on Nov 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 91
/
xsp.spec.in
101 lines (90 loc) · 3.1 KB
/
xsp.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
Name: xsp
Url: http://go-mono.com/
License: X11/MIT
Group: Productivity/Networking/Web/Servers
Version: @VERSION@
Release: 0
Summary: Small Web Server Hosting ASP.NET
Source: %{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildRequires: mono-devel mono-web mono-data-oracle mono-data-sqlite mono-nunit pkgconfig sqlite monodoc-core
%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
%define xspConfigsLocation %{_sysconfdir}/xsp/2.0
%define xspAvailableApps %{xspConfigsLocation}/applications-available
%define xspEnabledApps %{xspConfigsLocation}/applications-enabled
%description
The XSP server is a small Web server that hosts the Mono System.Web
classes for running what is commonly known as ASP.NET.
%prep
%setup -q
#%patch0
%build
#autoreconf -f -i -Wnone
# Cannot use the configure macro because noarch-redhat-linux is not recognized by the auto tools in the tarball
./configure --prefix=%{_prefix} \
--libexecdir=%{_prefix}/lib \
--libdir=%{_prefix}/lib \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--sysconfdir=%{_sysconfdir}
make
%install
make install DESTDIR=%{buildroot}
rm -rf %{buildroot}%{_prefix}/lib/xsp/unittests
mkdir -p %{buildroot}%{_datadir}
mv %{buildroot}%{_prefix}/lib/pkgconfig %{buildroot}%{_datadir}
%if 0%{?suse_version}
mkdir -p %{buildroot}/%{_fwdefdir}
mkdir -p %{buildroot}/%{xspAvailableApps}
mkdir -p %{buildroot}/%{xspEnabledApps}
mkdir -p %{buildroot}/etc/init.d/
mkdir -p %{buildroot}/etc/logrotate.d/
mkdir -p %{buildroot}/srv/xsp2
mkdir -p %{buildroot}/var/adm/fillup-templates
mkdir -p %{buildroot}/var/run/xsp2
install -m 644 man/mono-asp-apps.1 %{buildroot}%{_mandir}/man1/mono-asp-apps.1
install -m 644 packaging/opensuse/sysconfig.xsp2 %{buildroot}/var/adm/fillup-templates
install -m 644 packaging/opensuse/xsp2.fw %{buildroot}/%{_fwdefdir}/xsp2
install -m 644 packaging/opensuse/xsp2.logrotate %{buildroot}/etc/logrotate.d/xsp2
install -m 755 packaging/opensuse/xsp2.init %{buildroot}/etc/init.d/xsp2
install -m 755 tools/mono-asp-apps/mono-asp-apps %{buildroot}%{_bindir}/mono-asp-apps
%endif
%clean
rm -rf %{buildroot}
%if 0%{?suse_version}
%post
%{fillup_and_insserv -n xsp2 xsp2}
%preun
%stop_on_removal xsp2
%postun
%restart_on_update xsp2
%{insserv_cleanup}
%endif
%files
%defattr(-,root,root)
%{_bindir}/*
%{_datadir}/pkgconfig/*
%{_prefix}/lib/mono/4.5/Mono.WebServer2.dll
%{_prefix}/lib/mono/4.5/fastcgi-mono-server4.exe
%{_prefix}/lib/mono/4.5/mod-mono-server4.exe
%{_prefix}/lib/mono/4.5/xsp4.exe
%{_prefix}/lib/mono/gac/Mono.WebServer2
%{_prefix}/lib/mono/gac/fastcgi-mono-server4
%{_prefix}/lib/mono/gac/mod-mono-server4
%{_prefix}/lib/mono/gac/xsp4
%{_prefix}/lib/monodoc/sources/Mono.WebServer.*
%{_prefix}/lib/monodoc/sources/Mono.FastCGI.*
%{_prefix}/lib/xsp
%{_prefix}/share/man/*/*
%if 0%{?suse_version}
%config %{_fwdefdir}/xsp2
%config /etc/init.d/xsp2
%config /etc/logrotate.d/xsp2
/var/adm/fillup-templates/*
%attr(0711,wwwrun,www) /srv/xsp2
%attr(0711,wwwrun,www) /var/run/xsp2
%{_sysconfdir}/%{name}
%endif
%doc NEWS README
%changelog