Mailinglist Archive: opensuse-buildservice (124 mails)

< Previous Next >
[opensuse-buildservice] spec File für Centos
  • From: Günther J. Niederwimmer <gjn@xxxxxxxxxxx>
  • Date: Mon, 15 Aug 2016 16:15:50 +0200
  • Message-id: <3133092.iOoJX4tAH5@techz>
Hallo Liste,
Eine Anfänger Frage.

ich würde gerne ein Test File Bauen für CentOS 7
Das funktioniert auch soweit aber ;-).....

Da es für Cento 7 ist würde ich gerne das "el7" im rpm file haben, etwa so

damit man es leichter zuordnen kann

ich bekomme aber nur ein

wo ist da der Hund begraben, ich hänge mal das spec File an.
Name: mod_nss
Version: 1.0.14
Release: 1%{?dist}
Summary: SSL/TLS module for the Apache HTTP server
Group: System Environment/Daemons
License: ASL 2.0
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: nspr-devel &gt;= 4.9.2, nss-devel &gt;=
BuildRequires: httpd-devel, apr-devel, apr-util-devel
BuildRequires: pkgconfig
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
# Needed for make check
BuildRequires: openssl
BuildRequires: python-nose
BuildRequires: python-requests
# BuildRequires: python-ndg_httpsclient
Requires: httpd-mmn = %{_httpd_mmn}
Requires(post): httpd, nss-tools
Requires: nss%{?_isa} &gt;=
# Although the following change reverses the desire of Bugzilla Bug #601939,
# was provided to suppress the dangling symlink warning of Bugzilla Bug
# as exposed via &#39;rpmlint&#39;.
Requires: %{_libdir}/

# Change configuration to not conflict with mod_ssl
Patch1: mod_nss-conf.patch
# Generate a password-less NSS database
Patch2: mod_nss-gencert.patch

The mod_nss module provides strong cryptography for the Apache Web
server via the Secure Sockets Layer (SSL) and Transport Layer
Security (TLS) protocols using the Network Security Services (NSS)
security library.

%setup -q
%patch1 -p1 -b .conf
%patch2 -p1 -b .gencert

# Touch expression parser sources to prevent regenerating it
touch nss_expr_*.[chyl]




NSPR_INCLUDE_DIR=`/usr/bin/pkg-config --variable=includedir nspr`
NSPR_LIB_DIR=`/usr/bin/pkg-config --variable=libdir nspr`

NSS_INCLUDE_DIR=`/usr/bin/pkg-config --variable=includedir nss`
NSS_LIB_DIR=`/usr/bin/pkg-config --variable=libdir nss`

NSS_BIN=`/usr/bin/pkg-config --variable=exec_prefix nss`

autoreconf -i -f
%configure \
--with-nss-lib=$NSS_LIB_DIR \
--with-nss-inc=$NSS_INCLUDE_DIR \
--with-nspr-lib=$NSPR_LIB_DIR \
--with-nspr-inc=$NSPR_INCLUDE_DIR \
--with-apr-config --enable-ecc

make %{?_smp_mflags} all

# The install target of the Makefile isn&#39;t used because that uses apxs
# which tries to enable the module in the build host httpd instead of in
# the build root.

mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf
mkdir -p $RPM_BUILD_ROOT%{_httpd_confdir}
mkdir -p $RPM_BUILD_ROOT%{_libdir}/httpd/modules
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/alias
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8

%if &quot;%{_httpd_modconfdir}&quot; != &quot;%{_httpd_confdir}&quot;
# httpd &gt;= 2.4.x
mkdir -p $RPM_BUILD_ROOT%{_httpd_modconfdir}
sed -n /^LoadModule/p nss.conf &gt; 10-nss.conf
sed -i /^LoadModule/d nss.conf
install -m 644 10-nss.conf $RPM_BUILD_ROOT%{_httpd_modconfdir}

install -m 644 gencert.8 $RPM_BUILD_ROOT%{_mandir}/man8/
install -m 644 nss_pcache.8 $RPM_BUILD_ROOT%{_mandir}/man8/

install -m 644 nss.conf $RPM_BUILD_ROOT%{_httpd_confdir}

install -m 755 .libs/ $RPM_BUILD_ROOT%{_libdir}/httpd/modules/
install -m 755 nss_pcache $RPM_BUILD_ROOT%{_libexecdir}/
# Provide a compatibility link to prevent disruption of customized
# NOTE: This link may be deprecated in a future release of
ln -s %{_libexecdir}/nss_pcache $RPM_BUILD_ROOT%{_sbindir}/nss_pcache
install -m 755 gencert $RPM_BUILD_ROOT%{_sbindir}/
ln -s ../../../%{_libdir}/
touch $RPM_BUILD_ROOT%{_sysconfdir}/httpd/alias/secmod.db
touch $RPM_BUILD_ROOT%{_sysconfdir}/httpd/alias/cert8.db
touch $RPM_BUILD_ROOT%{_sysconfdir}/httpd/alias/key3.db
touch $RPM_BUILD_ROOT%{_sysconfdir}/httpd/alias/install.log

perl -pi -e &quot;s:$NSS_LIB_DIR:$NSS_BIN:&quot;

make check


umask 077

if [ &quot;$1&quot; -eq 1 ] ; then
if [ ! -e %{_sysconfdir}/httpd/alias/key3.db ]; then
%{_sbindir}/gencert %{_sysconfdir}/httpd/alias &gt;
%{_sysconfdir}/httpd/alias/install.log 2&gt;&amp;1
echo &quot;&quot;
echo &quot;%{name} certificate database generated.&quot;
echo &quot;&quot;

# Make sure that the database ownership is setup properly.
/bin/find %{_sysconfdir}/httpd/alias -user root -name &quot;*.db&quot; -
exec /bin/chgrp apache {} \;
/bin/find %{_sysconfdir}/httpd/alias -user root -name &quot;*.db&quot; -
exec /bin/chmod g+r {} \;

%doc README LICENSE docs/mod_nss.html
%config(noreplace) %{_httpd_confdir}/nss.conf
%if &quot;%{_httpd_modconfdir}&quot; != &quot;%{_httpd_confdir}&quot;
%config(noreplace) %{_httpd_modconfdir}/10-nss.conf
%dir %{_sysconfdir}/httpd/alias/
%ghost %attr(0640,root,apache) %config(noreplace)
%ghost %attr(0640,root,apache) %config(noreplace)
%ghost %attr(0640,root,apache) %config(noreplace)
%ghost %config(noreplace) %{_sysconfdir}/httpd/alias/install.log

Danke für die Hilfe,
mit freundlichen Grüßen / best regards,

Günther J. Niederwimmer
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >