Blob Blame History Raw
## TODO: 
## build docs
## enable LDAP support

Name:       aws 
Version:    2.11.0
Release:    13%{?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}-src.tgz
### Sources can be obtained from guthub
### https://github.com/landgraf/aws-fedora.git
Source1:    %{name}-fedora.tgz
## Fix incorrect enumeration of SSL versions
## report sent 20121012230755.GA8238@work.zhukoff.net
Patch0:     %{name}-%{version}-ssl_versions.patch
## Fix ipv5 implementation. Bug mailed by ada-ru
Patch1:     %{name}-%{version}-ipv6.patch
## Gnutls segfaults without the patch. Null pointer in Push function
## report sent 20120820120456.GI31565@work.zhukoff.net
Patch2:     %{name}-%{version}-remove_null_functions.patch
BuildRequires:   fedora-gnat-project-common  >= 3
BuildRequires:   gcc-gnat
BuildRequires:   gprbuild xmlada-devel gnutls-devel zlib-ada-devel
BuildRequires:   templates_parser-devel openldap-devel
# gcc-gnat only available on these:
ExclusiveArch: %{GNAT_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}

%description tools
%{summary}

%package doc 
Summary:    Documentation  for %{name}
Group:      Documentation
BuildArch:  noarch

%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

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

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


%build
export LIBRARY_TYPE=relocatable
export PRJ_BUILD=Release
export GNATOPTFLAGS="%GPRbuild_optflags"
cd fedora && make %{?_smp_mflags}
## later, maybe later
## cd .. && make build_doc


%install
cd fedora && make install DESTDIR=%{buildroot} LIBDIR=%{_libdir} GPRDIR="%_GNAT_project_dir"
cd  %{buildroot}/%{_libdir}/%{name}/ && rm -f lib%{name}.so && ln -s lib%{name}.so.%{version} lib%{name}.so
cd  %{buildroot}/%{_libdir}/ && ln -s %{name}/lib%{name}.so* .


%post     -p /sbin/ldconfig

%postun   -p /sbin/ldconfig


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


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

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


%files doc
%doc COPYING3 
%{_docdir}/%{name}


%changelog
* 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 24 2012 Pavel Zhukov <landgraf@fedoraproject.org> - 2.10.0-3
- Fix gpr file with "xmlada"; added

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