Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates-src > by-pkgid > 278b344a15d582440a6c6569cbaac3fc > files > 6

sks-1.1.4-1.fc17.src.rpm

Summary:        Synchronizing Key Server
Name:           sks
Version:        1.1.4
Release:        1%{?dist}
License:        GPLv2+
Group:          System Environment/Daemons
URL:            http://code.google.com/p/sks-keyserver/
# hg clone https://code.google.com/r/johnclizbe-sks-keyserver/
Source0:        https://bitbucket.org/skskeyserver/sks-keyserver/downloads/sks-1.1.4.tgz
Source1:        sks-db.init
Source2:        sks-recon.init
Patch0:         sks-libdb5.2.patch
Patch1:         sks-build.patch
#Patch1:		sks-1.1.1-bdb.patch

BuildRequires:  ocaml ocaml-camlp4-devel libdb-devel zlib-devel chrpath
%if 0%{?fedora} >= 19
BuildRequires: perl-podlators
%endif
Requires:       libdb
Requires(pre):    /usr/sbin/groupadd /usr/sbin/useradd
Requires(post):   /sbin/chkconfig
Requires(preun):  /sbin/chkconfig /sbin/service
Requires(postun): /sbin/service

# ocaml only available on these:
ExclusiveArch: alpha %{arm} %{ix86} ia64 x86_64 ppc ppc64 sparc sparcv9

%description
SKS is a OpenPGP keyserver whose goal is to provide easy to
deploy, decentralized, and highly reliable synchronization.

%prep
%setup -q
%patch0 -p1
%patch1 -p1

%build
mv Makefile.local.unused Makefile.local
make dep
make CFLAGS="$RPM_OPT_FLAGS -I`ocamlc -where` -I ." all

%install
make install PREFIX="%{buildroot}%{_prefix}" MANDIR="%{buildroot}%{_mandir}"
chmod -x %{buildroot}%{_mandir}/man8/sks.8.gz
chrpath --delete %{buildroot}%{_bindir}/sks
install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/sks-db
install -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/sks-recon
mkdir -p %{buildroot}%{_sbindir}
for TYPE in db recon; do
  ln -s %{_bindir}/%{name}  %{buildroot}%{_sbindir}/%{name}-${TYPE}
done


%pre
if ! getent group  %{name} >/dev/null 2>&1; then
  /usr/sbin/groupadd -r %{name}
fi
if ! getent passwd %{name} >/dev/null 2>&1; then
  /usr/sbin/useradd  -r -g %{name}       \
        -d %{_localstatedir}/lib/%{name} \
        -c "SKS Service user"            \
        -s /sbin/nologin %{name}
fi
exit 0                  # Always pass


%post
/sbin/chkconfig --add %{name}-db
/sbin/chkconfig --add %{name}-recon

%preun
if [ $1 -eq 0 ]; then   # Remove
  /sbin/service %{name}-recon stop >/dev/null 2>&1
  /sbin/service %{name}-db    stop >/dev/null 2>&1

  /sbin/chkconfig --del %{name}-recon
  /sbin/chkconfig --del %{name}-db
fi


%postun
if [ $1 -ge 1 ]; then   # Upgrade
  /sbin/service %{name}-db    condrestart >/dev/null 2>&1 || :
  /sbin/service %{name}-recon condrestart >/dev/null 2>&1 || :
fi


%triggerin -- prelink, %{_sysconfdir}/prelink.conf
# Prevent prelink from modifying programs
if ! %{__grep} -q "%{_bindir}/{%{name}" %{_sysconfdir}/prelink.conf 2>/dev/null; then
  echo -e "-b %{_bindir}/{%{name},sks_add_mail,spider}" \
        >>%{_sysconfdir}/prelink.conf
fi

%files
%defattr(-,root,root)
%doc ANNOUNCEMENT BUGS CHANGELOG FILES LICENSE README.md TODO UPGRADING VERSION
%doc sampleConfig sampleWeb
%{_bindir}/sks
%{_bindir}/sks_build.sh
%{_bindir}/sks_add_mail
%{_sbindir}/%{name}-db
%{_sbindir}/%{name}-recon
%{_mandir}/man8/sks.8.gz
%{_initrddir}/sks-*

%changelog
* Wed Feb 20 2013 Nick Bebout <nb@fedoraproject.org> - 1.1.4-1
- Upgrade to 1.1.4

* Wed Feb 20 2013 Nick Bebout <nb@fedoraproject.org> - 1.1.3-5
- Fix broken build

* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Fri Jul 27 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Wed May 23 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 1.1.3-2
- Fix ARM arch definition, update spec

* Sat Apr 21 2012 Nick Bebout <nb@fedoraproject.org> - 1.1.3-1
- Upgrade to 1.1.3

* Tue Jan 24 2012 Nick Bebout <nb@fedoraproject.org> - 1.1.3-0.2.20120124hg
- Try to build against libdb 5.2

* Tue Jan 24 2012 Nick Bebout <nb@fedoraproject.org> - 1.1.3-0.1.20120124hg
- Upgrade to John Clizbe's latest sks from mercurial repo so we can use
- css, etc in the webpage

* Thu Jan 19 2012 Nick Bebout <nb@fedoraproject.org> - 1.1.2-2
- Add init.d scripts

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Dec 13 2011 Nick Bebout <nb@fedoraproject.org> - 1.1.2-1
- Upgrade to 1.1.2

* Wed Oct 26 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-7
- Rebuilt for glibc bug#747377

* Fri Apr 29 2011 Dan Horák <dan[at]danny.cz> - 1.1.1-6
- updated the supported arch list

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue May 18 2010 Nick Bebout <nb@fedoraproject.org> - 1.1.1-4
- Make bdb patch better

* Tue Apr 20 2010 Nick Bebout <nb@fedoraproject.org> - 1.1.1-3
- Fix FTBFS

* Wed Oct 14 2009 Nick Bebout <nb@fedoraproject.org> - 1.1.1-2
- Add CFLAGS to make all

* Tue Oct 13 2009 Nick Bebout <nb@fedoraproject.org> - 1.1.1-1
- Initial Fedora package based on 1.1.1 of sks