Blob Blame History Raw
%undefine _hardened_build
%global with_gnutls 1
%global with_gps 0
%global git_release git20150523
Name:       aws 
Version:    3.2.0
Release:    1.%{git_release}%{?dist}
Summary:    Ada Web Server

Group:      System Environment/Libraries
License:    GPLv3+ with exceptions and GPLv2+ 
URL:        http://libre.adacore.com/tools/aws 
## Direct download does't work
## http://libre.adacore.com/libre/download/
Source0:    %{name}-gpl-%{version}-%{git_release}-src.tgz
Source1:    %{name}-manpages.tar.gz
Patch0:     %{name}-%{version}-remove_bundled.patch
Patch1:     %{name}-%{version}-config.patch
BuildRequires:   fedora-gnat-project-common  >= 3
BuildRequires:   gcc-gnat libgcrypt-devel
BuildRequires:   gprbuild >= 2014
BuildRequires:   xmlada-devel 
%if %{with_gnutls}
BuildRequires:   gnutls-devel 
%endif
BuildRequires:   zlib-ada-devel chrpath
BuildRequires:   templates_parser-devel openldap-devel
BuildRequires:   python-sphinx
## gprinstall uses it
BuildRequires:   fedora-gnat-project-common >= 3
# gcc-gnat only available on these:
ExclusiveArch:   %GPRbuild_arches


%description
AWS is a complete framework to develop Web based applications. 
The main part of the framework is the embedded Web server. 
This small yet powerful Web server can be embedded into your application 
so your application will be able to talk with a standard Web browser  
Around this Web server a lot of services have been developed. 

%package tools
Summary:    Tools for %{name}
License:    GPLv3+
Group:      Applications/Text
Requires:   %{name}%{?_isa} = %{version}-%{release}
Requires:   gnutls-devel 
Requires:   libgcrypt-devel 


%description tools
%{summary}

%package doc 
Summary:    Documentation  for %{name}
Group:      Documentation
BuildArch:  noarch
Requires:   %{name} = %{version}-%{release}

%description doc
%{summary}

%package devel
Summary:    Devel package for %{name}
Group:      Development/Libraries
Requires:   %{name}%{?_isa} = %{version}-%{release}
Requires:   fedora-gnat-project-common  zlib-ada-devel
Requires:   templates_parser-devel xmlada-devel
%if %{with_gnutls}
Requires:   gnutls-devel  libgcrypt-devel
%endif

%description devel
%{summary}
Documentation can be found in -doc subpackage 

%prep
%setup -q -n %{name}-gpl-%{version}-src
tar -xvf %{SOURCE1}
%patch0 -p1 
%patch1 -p1
rm -rf templates_parser
rm -rf include/zlib*


%build
make setup DEFAULT_LIBRARY_TYPE=relocatable ENABLE_SHARED=true GPRBUILD="gprbuild %GPRbuild_optflags"
make LIBRARY_TYPE=relocatable GPRBUILD="gprbuild %GPRbuild_optflags"
make build-doc


%install
make install DESTDIR=%{buildroot}  I_GPR="%_GNAT_project_dir"  \
I_LIB=%{buildroot}%{_libdir} prefix=%{_prefix}
##install_man_pages:
mkdir -p %{buildroot}/%{_mandir}/man1/
for i in `ls *.1`; do gzip -c $i >> %{buildroot}/%{_mandir}/man1/$i.gz; done
mv %{buildroot}%{_datadir}/examples %{buildroot}%{_docdir}/%{name}/
cd %{buildroot}/%{_libdir} && ln -s aws/lib%{name}-%{version}.so .
%if %{with_gps} != 1
## GPS is not packaged
rm -rf %{buildroot}/%{_datadir}/gps
%endif

%post     -p /sbin/ldconfig

%postun   -p /sbin/ldconfig


%files
%doc COPYING3
%dir %{_libdir}/%{name}
%{_libdir}/lib%{name}-%{version}.so
%{_libdir}/%{name}/lib%{name}-%{version}.so


%files devel
%doc INSTALL demos 
%_GNAT_project_dir/%{name}*
%_GNAT_project_dir/manifests/%{name}
%{_includedir}/%{name}
%{_libdir}/%{name}/*.ali
%{_libdir}/lib%{name}.so
%{_libdir}/%{name}/lib%{name}.so

%files tools 
%{_bindir}/*
%{_mandir}/man1/*.1.gz


%files doc
%exclude %{_docdir}/%{name}/examples
%{_docdir}/%{name}/*


%changelog
* Thu Apr 30 2015 Björn Persson <Bjorn@xn--rombobjrn-67a.se> - 3.1.0-13
- Patched to build with GCC 5.

* Sat Oct 11 2014 Pavel Zhukov <landgraf@fedoraproject.org> - 3.1.0-12
- Fixed typos 

* Thu Oct 02 2014 Pavel Zhukov <landgraf@fedoraproject.org> - 3.1.0-11
- Exclude %{arm}

* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Thu Jul 17 2014 Ralf Corsépius <corsepiu@fedoraproject.org> - 3.1.0-9
- Fix typo: R: libgcrypt-devel, not libgrypt-devel.
- Add missing %%changelog entry.

* Tue Jun 24 2014 Pavel Zhukov <landgraf@fedoraproject.org> - 3.1.0-8
- Add missed requirements.

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Mon Apr 21 2014 Pavel Zhukov <landgraf@fedoraproject.org> - 3.1.0-5
- Rebuild with new GCC 

* Wed Dec 18 2013 Pavel Zhukov <landgraf@fedoraproject.org> - 3.1.0-4
- Add demos 
- Fix libdir in subpackages

* Tue Dec 17 2013 Pavel Zhukov <landgraf@fedoraproject.org> - 3.1.0-1
- New release 3.1.0

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.11.0-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Mar 13 2013  Pavel Zhukov <landgraf@fedoraproject.org> - 2.11.0-16
- Disable gnutls support (rhbz#918554)

* Sun Mar 10 2013  Pavel Zhukov <landgraf@fedoraproject.org> - 2.11.0-15
- Rebuild with new xmlada

* Wed Mar  6 2013 Tomáš Mráz <tmraz@redhat.com> 2.11.0-14
- Rebuild with new gnutls

* Fri Jan 25 2013 Kevin Fenzi <kevin@scrye.com> 2.11.0-13
- Rebuild for new libgnat

* Tue Dec 18 2012  Pavel Zhukov <landgraf@fedoraproject.org> - 2.11.0-12
- New xmlada 

* Fri Nov  2 2012  Pavel Zhukov <landgraf@fedoraproject.org> - 2.11.0-11
- Add gcc-gnat and zlib-ada-devel dependencies

* Sun Oct 28 2012  Pavel Zhukov <landgraf@fedoraproject.org> - 2.11.0-10
- Remove "-lz" flag
- Remove dependencies -doc from base package
- Fix tools license 
- Add man pages

* Sat Oct 13 2012  Pavel Zhukov <landgraf@fedoraproject.org> - 2.11.0-8
- Remove zlib-ada sources
- Fix license tag
- Multiple fixes https://bugzilla.redhat.com/show_bug.cgi?id=810676#c28
- Fix gpr

* Mon Aug 20 2012  Pavel Zhukov <landgraf@fedoraproject.org> - 2.11.0-6
- Fix templates_parser import 
- Add gnutls patch
- Fix license
- Add LDAP support

* Fri Aug 17 2012 Pavel Zhukov <landgraf@fedoraproject.org> - 2.11.0-4
- Change group
- Remove template_parsers.gpr
- Add doc subpackages

* Thu Aug 16 2012  Pavel Zhukov <landgraf@fedoraproject.org> - 2.11.0-2
- Fix ipv6 issue
- Add tools package

* Thu Aug 16 2012  Pavel Zhukov <landgraf@fedoraproject.org> - 2.11.0-1
- Update to AWS-2012

* Sun May 20 2012  Pavel Zhukov <landgraf@fedoraproject.org> - 2.10.0-7
- Change cp with cp -a 
- Remove chrpath dependency

* Fri Apr 13 2012  Pavel Zhukov <landgraf@fedoraproject.org> - 2.10.0-6
- Fix copyright in aws.gpr file

* Mon Apr 09 2012 Pavel Zhukov <landgraf@fedoraproject.org> - 2.10.0-5
- Fix -devel requires
- Fix -devel license
- Fix version in ChangeLog

* Sun Apr 08 2012 Pavel Zhukov <landgraf@fedoraproject.org> - 2.10.0-4
- Fix smp optflag

* Sun Mar 25 2012 Pavel Zhukov <landgraf@fedoraproject.org> - 2.10.0-3
- Fix gpr file with "xmlada"; added

* Sat Mar 24 2012 Pavel Zhukov <landgraf@fedoraproject.org> - 2.10.0-2
- Initial build
- add "directories"