Permalink
Browse files

Some spec file fixes and don't install unittests

svn path=/branches/mono-2-2/xsp/; revision=121392
  • Loading branch information...
1 parent b0b3397 commit 898a7cf1b9e5742588d79b89cedd4deb6f98d344 Andrew Jorgensen committed Dec 12, 2008
@@ -2,23 +2,21 @@
# norootforbuild
Name: xsp
-URL: http://go-mono.com/
-License: GNU General Public License (GPL)
+Url: http://go-mono.com/
+License: GPL v2 or later
Group: Productivity/Networking/Web/Servers
-Autoreqprov: on
-Version: 1.2.5
-Release: 3.novell
+AutoReqProv: on
+Version: 2.2
+Release: 15
Summary: Small Web Server Hosting ASP.NET
Source: %{name}-%{version}.tar.bz2
-#Patch: xsp-libexecdir.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildArch: noarch
-
-BuildRequires: mono-devel mono-web pkgconfig
+BuildArch: noarch
+BuildRequires: mono-devel mono-web mono-data-oracle mono-jscript mono-nunit pkgconfig sqlite
##### suse ####
%if 0%{?suse_version}
-
+PreReq: %insserv_prereq %fillup_prereq
%define old_suse_buildrequires mono-data mono-winforms
%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
@@ -29,24 +27,20 @@ BuildRequires: %{old_suse_buildrequires}
%if %sles_version == 9
BuildRequires: %{old_suse_buildrequires}
%endif
-
%endif
-
# Fedora options (Bug in fedora images where 'abuild' user is the same id as 'nobody')
-%if 0%{?fedora_version}
+%if 0%{?fedora_version} || 0%{?rhel_version}
%define env_options export MONO_SHARED_DIR=/tmp
%endif
-%define xspConfigsLocation /etc/xsp/2.0
+%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.
-
-%debug_package
%prep
%setup -q
@@ -56,37 +50,40 @@ classes for running what is commonly known as ASP.NET.
./configure --prefix=%{_prefix} \
--libexecdir=%{_prefix}/lib \
--libdir=%{_prefix}/lib \
- --mandir=%{_prefix}/share/man \
- --infodir=%{_prefix}/share/info \
+ --mandir=%{_mandir} \
+ --infodir=%{_infodir} \
--sysconfdir=%{_sysconfdir}
make
%install
%{?env_options}
-make install DESTDIR=$RPM_BUILD_ROOT
-mkdir -p ${RPM_BUILD_ROOT}/%{xspAvailableApps}
-mkdir -p ${RPM_BUILD_ROOT}/%{xspEnabledApps}
-mkdir -p ${RPM_BUILD_ROOT}/%{_fwdefdir}
-mkdir -p ${RPM_BUILD_ROOT}/usr/share
-mv ${RPM_BUILD_ROOT}/usr/lib/pkgconfig ${RPM_BUILD_ROOT}/usr/share
+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 ${RPM_BUILD_ROOT}/etc/init.d/
-mkdir -p ${RPM_BUILD_ROOT}/var/adm/fillup-templates
-mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d/
-mkdir -p ${RPM_BUILD_ROOT}/srv/xsp2
-install -m 644 packaging/opensuse/xsp2.fw ${RPM_BUILD_ROOT}/%{_fwdefdir}/xsp2
-install -m 755 packaging/opensuse/xsp2.init ${RPM_BUILD_ROOT}/etc/init.d/xsp2
-install -m 644 packaging/opensuse/sysconfig.xsp2 ${RPM_BUILD_ROOT}/var/adm/fillup-templates
-install -m 644 packaging/opensuse/xsp2.logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/xsp2
-install -m 755 tools/mono-asp-apps/mono-asp-apps ${RPM_BUILD_ROOT}/usr/bin/mono-asp-apps
-install -m 544 man/mono-asp-apps.1 ${RPM_BUILD_ROOT}/usr/share/man/man1/mono-asp-apps.1
+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 $RPM_BUILD_ROOT
+rm -rf %{buildroot}
%if 0%{?suse_version}
%post
-%{fillup_and_insserv -n -s xsp2 xsp2 START_XSP2}
+%{fillup_and_insserv xsp2}
%preun
%stop_on_removal xsp2
@@ -115,31 +112,26 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/lib/mono/1.0/mod-mono-server.exe
%{_prefix}/lib/mono/gac/mod-mono-server2
%{_prefix}/lib/mono/2.0/mod-mono-server2.exe
+%{_prefix}/lib/mono/gac/fastcgi-mono-server
%{_prefix}/lib/mono/1.0/fastcgi-mono-server.exe
+%{_prefix}/lib/mono/gac/fastcgi-mono-server2
%{_prefix}/lib/mono/2.0/fastcgi-mono-server2.exe
-%{_prefix}/lib/mono/gac/fastcgi-mono-server/
-%{_prefix}/lib/mono/gac/fastcgi-mono-server2/
-%{_prefix}/var/run/xsp2/
-
%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
-%{xspConfigsLocation}/*
+%{_sysconfdir}/%{name}
%endif
%doc NEWS README
-# auto dep/req generation for older distros (it will take a while for the .config scanning to get upstream)
-%if 0%{?suse_version} <= 1040 || 0%{?fedora_version} <= 7
-%if 0%{?fedora_version}
+%if 0%{?fedora_version} || 0%{?rhel_version}
# Allows overrides of __find_provides in fedora distros... (already set to zero on newer suse distros)
%define _use_internal_dependency_generator 0
%endif
-%define __find_provides env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-provides && printf "%s\\n" "${filelist[@]}" | /usr/bin/mono-find-provides ; } | sort | uniq'
-%define __find_requires env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-requires && printf "%s\\n" "${filelist[@]}" | /usr/bin/mono-find-requires ; } | sort | uniq'
-%endif
+%define __find_provides env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-provides && printf "%s\\n" "${filelist[@]}" | /usr/bin/mono-find-provides ; } | sort -u'
+%define __find_requires env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-requires && printf "%s\\n" "${filelist[@]}" | /usr/bin/mono-find-requires ; } | sort -u'
%changelog
View
@@ -1,3 +1,7 @@
+2008-12-11 Andrew Jorgensen <ajorgensen@novell.com>
+
+ * Makefile.am: Don't install unittests to system
+
2007-01-08 Sebastien Pouliot <sebastien@ximian.com>
* webroot/*: Web files used for the tests.
@@ -1,6 +1,3 @@
SUBDIRS = Tests.XSP.Security webroot
EXTRA_DIST = ChangeLog NOACCESS README
-
-unittestsdir = $(pkglibdir)/unittests
-unittests_DATA = $(EXTRA_DIST)
@@ -1,3 +1,7 @@
+2008-12-11 Andrew Jorgensen <ajorgensen@novell.com>
+
+ * Makefile.am: Don't install unittests to system
+
2008-02-25 Raja R Harinath <harinath@hurrynot.org>
* Makefile.am (security_test_sources): Files are in $(srcdir).
@@ -8,9 +8,6 @@ security_test_sources = \
CLEANFILES = Tests.XSP.Security.dll*
EXTRA_DIST = $(security_test_sources)
-unittestsdir = $(pkglibdir)/unittests/Tests.XSP.Security
-unittests_DATA = $(security_test_sources) Tests.XSP.Security.dll Makefile
-
Tests.XSP.Security.dll: $(security_test_sources)
mcs -debug -pkg:mono-nunit -out:$@ -t:library $(security_test_sources)
@@ -1,3 +1 @@
EXTRA_DIST = index.aspx
-unittestsdir = $(pkglibdir)/unittests/webroot
-unittests_DATA = $(EXTRA_DIST)

0 comments on commit 898a7cf

Please sign in to comment.