Blob Blame History Raw
Name:             tntnet
Version:          2.2
Release:          4%{?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
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}

%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}

%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
%systemd_post %{name}.service

%preun
%systemd_preun %{name}.service

%postun
%systemd_postun_with_restart %{name}.service

%files
%defattr (-, root, root)
%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/tntnet-conf2xml.pl
%{_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
%defattr (-, root, root)
%{_bindir}/tntnet-config
%{_libdir}/libtntnet*.so
%{_includedir}/tnt/

%changelog
* Tue May 14 2013 Martin Gansser <martinkg@fedoraproject.org> - 2.2-4
- rebuilt against new cxxtools

* 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