Accepting request 312678 from home:thehejik:branches:server:http
Please check and forward to Factory, requested by bnc#899218 - package cleanup (bnc#899218) * removed SUSE branding * added logrotate support * changed note about default codepage OBS-URL: https://build.opensuse.org/request/show/312678 OBS-URL: https://build.opensuse.org/package/show/server:http/thttpd?expand=0&rev=31
This commit is contained in:
committed by
Git OBS Bridge
parent
65421b8b00
commit
9542aab497
44
thttpd.spec
44
thttpd.spec
@@ -16,6 +16,7 @@
|
||||
#
|
||||
|
||||
|
||||
%define serverroot /srv/www
|
||||
%if 0%{?suse_version} > 1220
|
||||
%define with_systemd 1
|
||||
%else
|
||||
@@ -29,8 +30,10 @@ License: BSD-3-Clause
|
||||
Group: Productivity/Networking/Web/Servers
|
||||
Url: http://www.acme.com/software/thttpd/
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
Source1: %{name}-SuSE.tar.bz2
|
||||
Source1: %{name}-initd.script
|
||||
Source2: %{name}.service
|
||||
Source3: %{name}.logrotate
|
||||
Source4: %{name}.conf
|
||||
Patch0: %{name}-2.25b-configure.patch
|
||||
Patch1: %{name}-2.25b-dirs.patch
|
||||
Patch2: %{name}-2.25b-time_h.patch
|
||||
@@ -50,9 +53,10 @@ Patch15: thttpd-crypt_is_in_crypt.h.patch
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
Requires(post): permissions
|
||||
Provides: http_daemon
|
||||
Recommends: logrotate
|
||||
# both packages provide /usr/bin/htpasswd
|
||||
Conflicts: apache2-utils
|
||||
Provides: http_daemon
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with_systemd}
|
||||
BuildRequires: systemd
|
||||
@@ -70,10 +74,8 @@ in memory use. Basic support for cgi scripts, authentication, and ssi
|
||||
is provided for. Advanced features include the ability to throttle
|
||||
traffic.
|
||||
|
||||
%define serverroot /srv/www
|
||||
|
||||
%prep
|
||||
%setup -q -a 1
|
||||
%setup -q
|
||||
%patch0
|
||||
%patch1
|
||||
%patch2
|
||||
@@ -92,24 +94,17 @@ traffic.
|
||||
|
||||
%build
|
||||
cp %{_datadir}/automake-1.*/config.* .
|
||||
# update server root path
|
||||
sed -i "s@__SRVROOT__@%{serverroot}/htdocs@g" README.SuSE SuSE%{_sysconfdir}/thttpd.conf
|
||||
sed -i "s@__PREFIX__@%{_prefix}@g;\
|
||||
s@__SYSCONFDIR__@%{_sysconfdir}@g;\
|
||||
s@__NAME__@%{name}@g;\
|
||||
s@__VERSION__@%{version}@g" SuSE%{_initddir}/thttpd
|
||||
chmod 744 SuSE%{_initddir}/thttpd
|
||||
chmod 644 SuSE%{_sysconfdir}/thttpd.conf
|
||||
mv aclocal.m4 acinclude.m4
|
||||
libtoolize --force
|
||||
aclocal --force
|
||||
autoconf -f
|
||||
V_CCOPT="%{optflags} -Wall" \
|
||||
export V_CCOPT="%{optflags}"
|
||||
export CFLAGS="%{optflags}"
|
||||
%configure
|
||||
%ifarch s390 s390x
|
||||
make F_PIE="-fPIE" %{?_smp_mflags}
|
||||
make F_PIE="-fPIE" -j1
|
||||
%else
|
||||
make F_PIE="-fpie" %{?_smp_mflags}
|
||||
make F_PIE="-fpie" -j1
|
||||
%endif
|
||||
|
||||
%install
|
||||
@@ -119,18 +114,18 @@ install -d %{buildroot}%{_bindir} \
|
||||
%{buildroot}%{_mandir}/man8 \
|
||||
%{buildroot}%{serverroot}/htdocs/users
|
||||
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||
cp -a SuSE/* %{buildroot}
|
||||
rm -f %{buildroot}%{serverroot}/htdocs/index.html
|
||||
install -D -m0644 index.html %{buildroot}/%{serverroot}/htdocs/index.html
|
||||
install -D -m0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/%{name}.conf
|
||||
install -D -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||
%if %{with_systemd}
|
||||
rm -rf %{buildroot}%{_sysconfdir}/init.d
|
||||
rm %{buildroot}%{_sbindir}/rc%{name}
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
install -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service
|
||||
install -D -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service
|
||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||
%else
|
||||
install -D -m0644 %{SOURCE1} %{buildroot}%{_initddir}/%{name}
|
||||
ln -s %{buildroot}%{_initddir}/%{name} %{buildroot}%{_sbindir}/rc%{name}
|
||||
%endif
|
||||
|
||||
%if %{with_systemd}
|
||||
|
||||
%pre
|
||||
%service_add_pre %{name}.service
|
||||
%endif
|
||||
@@ -167,13 +162,14 @@ ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%doc README README.SuSE config.h
|
||||
%doc README config.h
|
||||
%{serverroot}/htdocs/*
|
||||
%attr(775, root, www) %{serverroot}/htdocs/users
|
||||
%verify(not mode) %attr(2750, root, www) %{_bindir}/makeweb
|
||||
%{_bindir}/htpasswd
|
||||
%{_sbindir}/*
|
||||
%{_mandir}/*/*
|
||||
%config %{_sysconfdir}/logrotate.d/%{name}
|
||||
%if %{with_systemd}
|
||||
%{_unitdir}/%{name}.service
|
||||
%else
|
||||
|
Reference in New Issue
Block a user