Name: tntnet
Version: 2.2.1
Release: 5%{?dist}
Summary: A web application server for web applications
# GPLv2+: framework/common/gcryptinit.c
# zlib: framework/common/unzip.h
License: LGPLv2+ and GPLv2+ and zlib
URL: http://www.tntnet.org/
Source0: http://www.tntnet.org/download/%{name}-%{version}.tar.gz
# http://sourceforge.net/tracker/?func=detail&aid=3542704&group_id=119301&atid=684050
Source1: %{name}.service
BuildRequires: kernel-headers
BuildRequires: openssl-devel
BuildRequires: cxxtools-devel >= 2.2.1
BuildRequires: zip
BuildRequires: zlib-devel
BuildRequires: systemd-units
Requires(pre): shadow-utils
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%description
%{summary}
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: cxxtools-devel%{?_isa} >= 2.2.1
%description devel
Development files for %{name}
%prep
%setup -q
%build
%configure --disable-static
make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
# Systemd unit files
# copy tntnet.service to unitdir /lib/systemd/system
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/
install -Dpm 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/%{name}.service
# Find and remove all la files
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
# remove sysv init script
rm $RPM_BUILD_ROOT/etc/init.d/%{name}
%check
utest/utest
%pre
getent group %{name} > /dev/null || groupadd -r %{name}
getent passwd %{name} > /dev/null || \
useradd -r -g %{name} -d %{_localstatedir}/lib/%{name} -s /sbin/nologin \
-c "User" %{name}
exit 0
%post
/sbin/ldconfig
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
/sbin/ldconfig
%files
%doc AUTHORS ChangeLog COPYING README
%dir %{_sysconfdir}/tntnet
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.xml
%{_unitdir}/%{name}.service
%{_bindir}/ecppc
%{_bindir}/ecppl
%{_bindir}/ecppll
%{_bindir}/tntnet
%{_libdir}/libtntnet*.so.*
%{_libdir}/tntnet/
%{_datadir}/tntnet/
%{_mandir}/man1/ecppc.1.gz
%{_mandir}/man1/ecppl.1.gz
%{_mandir}/man1/ecppll.1.gz
%{_mandir}/man1/tntnet-config.1.gz
%{_mandir}/man7/ecpp.7.gz
%{_mandir}/man7/tntnet.xml.7.gz
%{_mandir}/man7/tntnet.properties.7.gz
%{_mandir}/man8/tntnet.8.gz
%files devel
%{_bindir}/tntnet-config
%{_libdir}/libtntnet*.so
%{_includedir}/tnt/
%changelog
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 2.2.1-5
- Rebuilt for GCC 5 C++11 ABI change
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Jan 25 2014 Ville Skyttä <ville.skytta@iki.fi> - 2.2.1-2
- Own the %%{_datadir}/tntnet dir.
- Run unit tests during build.
* Mon Jan 20 2014 Martin Gansser <martinkg@fedoraproject.org> - 2.2.1-1
- new release
* Sun Sep 22 2013 Michael Schwendt <mschwendt@fedoraproject.org> - 2.2-8
- Add missing dependency on cxxtools-devel in tntnet-devel (#896003).
- Add missing /sbin/ldconfig calls in %%post and %%postun.
- Using %%defattr is not needed anymore.
* Thu Aug 08 2013 Petr Pisar <ppisar@redhat.com> - 2.2-7
- Perl 5.18 rebuild
* Wed Aug 07 2013 Petr Pisar <ppisar@redhat.com> - 2.2-6
- Perl 5.18 rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Jul 18 2013 Petr Pisar <ppisar@redhat.com> - 2.2-4
- Perl 5.18 rebuild
* Fri May 10 2013 Martin Gansser <martinkg@fedoraproject.org> - 2.2-3
- corrected bogus date format in %%changelog
- fixed typos in tntnet spec file
- added minimal cxxtools version requirement
* Thu May 9 2013 Martin Gansser <martinkg@fedoraproject.org> - 2.2-2
- corrected requirements
- rebuild
* Fri May 3 2013 Martin Gansser <martinkg@fedoraproject.org> - 2.2-1
- new release
- spec file cleanup
* Thu Aug 23 2012 Martin Gansser <linux4martin@gmx.de> - 2.1-15
- fixed typos in tntnet spec file
* Wed Aug 22 2012 Martin Gansser <linux4martin@gmx.de> - 2.1-14
- fix for "Introduce new systemd-rpm macros in tntnet spec file" (#850341)
* Thu Jul 26 2012 Martin Gansser <linux4martin@gmx.de> - 2.1-13
- added missing BuildRequires systemd-units
* Thu Jul 26 2012 Martin Gansser <linux4martin@gmx.de> - 2.1-12
- spec file cleanup
- changed changelog readability
* Wed Jul 18 2012 Martin Gansser <linux4martin@gmx.de> - 2.1-11
- added missing build requirement kernel-headers
* Fri Jul 13 2012 Martin Gansser <linux4martin@gmx.de> - 2.1-10
- added upstream link for gcc 4.7 patch
- changed license type
- make install preserve timestamps
* Tue Jul 3 2012 Martin Gansser <linux4martin@gmx.de> - 2.1-9
- removed rm in install section
- removed systemd readme file
- added link to upstream systemd patch
* Sun Jun 24 2012 Martin Gansser <linux4martin@gmx.de> - 2.1-8
- removed group and user apache from tntnet.conf
- added own group tntnet to tntnet.conf
- added creation of users and groups in pre section
* Thu Jun 21 2012 Martin Gansser <linux4martin@gmx.de> - 2.1-7
- added systemd-fedora-readme
* Wed Jun 20 2012 Martin Gansser <linux4martin@gmx.de> - 2.1-6
- changed group and user for fedora to apache
* Sun Jun 17 2012 Martin Gansser <linux4martin@gmx.de> - 2.1-5
- fixed more missing slash in path
- fixed missing system unit file
* Sun Jun 17 2012 Martin Gansser <linux4martin@gmx.de> - 2.1-4
- fixed missing slash in path
* Sat Jun 16 2012 Martin Gansser <linux4martin@gmx.de> - 2.1-3
- gcc-4.7 patch
- added systemd service file
- removed sysv init stuff
- cleanup spec file
* Tue May 29 2012 Martin Gansser <linux4martin@gmx.de> - 2.1-2
- removed license comment
- removed empty files
- fixed Requires and Group tag
* Sun Apr 29 2012 Martin Gansser <linux4martin@gmx.de> - 2.1-1
- new release
* Mon Sep 19 2011 Sebastian Vahl <fedora@deadbabylon.de> - 2.0-2
- cleanup spec a bit
* Sun Sep 18 2011 Sebastian Vahl <fedora@deadbabylon.de> - 2.0-1
- initial release