Blob Blame Raw
Name:           acegisecurity
Version:        1.0.7
Release:        9%{?dist}
Summary:        Java/J2EE application security framework
License:        ASL 2.0
BuildArch:      noarch

# sh
Source0:        %{name}-%{version}.tar.gz

# we don't have and don't need all the dependencies of acegisecurity thus build
# this package against these stubs only
Patch0:         0001-Stubs-for-casclient.patch
Patch1:         0001-Stubs-for-Spring-Framework-2.patch

Patch2:         0001-Remove-unmappable-characters.patch
Patch3:         0001-Port-to-Spring-Framework-3.patch

BuildRequires:  maven-local
BuildRequires:  mvn(commons-codec:commons-codec)
BuildRequires:  mvn(commons-collections:commons-collections)
BuildRequires:  mvn(commons-lang:commons-lang)
BuildRequires:  mvn(commons-logging:commons-logging)
BuildRequires:  mvn(javax.servlet:jsp-api)
BuildRequires:  mvn(javax.servlet:servlet-api)
BuildRequires:  mvn(log4j:log4j)
BuildRequires:  mvn(net.sf.ehcache:ehcache)
BuildRequires:  mvn(org.aspectj:aspectjrt)
BuildRequires:  mvn(org.jasig.cas.client:cas-client-core)
BuildRequires:  mvn(org.springframework:spring-beans)
BuildRequires:  mvn(org.springframework:spring-context)
BuildRequires:  mvn(org.springframework:spring-core)
BuildRequires:  mvn(org.springframework:spring-jdbc)
BuildRequires:  mvn(org.springframework:spring-test)
BuildRequires:  mvn(org.springframework:spring-web)
BuildRequires:  mvn(oro:oro)

Acegi Security is a Java/Java EE framework that provides advanced
authentication, authorization and other comprehensive security features for
enterprise applications. In addition to having a comprehensive list of
security functionality, Acegi Security is very configurable and employs the
Spring Framework for configuration, it allows for reuse and portability of
security components, and it can also be used with non-Spring applications.

%package javadoc
Summary:        Javadoc for %{name}

%description javadoc
API documentation for %{name}.

%setup -q 

%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

cp %{SOURCE1} pom.xml
cp %{SOURCE2} license.txt

# missing parent pom
%pom_xpath_inject "pom:project" "<groupId>org.acegisecurity</groupId>"
%pom_xpath_inject "pom:project" "<version>%{version}</version>"

# unneeded/unavailable deps
%pom_remove_dep cas:casclient
%pom_remove_dep taglibs:standard
%pom_remove_dep hsqldb:hsqldb
%pom_remove_dep org.slf4j:slf4j-log4j12
%pom_remove_dep jmock:jmock

# TODO: remove this
#%%pom_remove_dep aspectj:aspectjrt
#%%pom_add_dep org.aspectj:aspectjrt

# fix springframework gId:aId
# TODO: upstream moved a lot of classes to different JARs in springframework
# 3.x, should we add aliases?
%pom_remove_dep org.springframework:spring-remoting
%pom_remove_dep org.springframework:spring-jdbc
%pom_remove_dep org.springframework:spring-support
%pom_remove_dep org.springframework:spring-web
%pom_remove_dep org.springframework:spring-mock
%pom_remove_dep org.springframework:spring-ldap
%pom_add_dep org.springframework:spring-context
%pom_add_dep org.springframework:spring-beans
%pom_add_dep org.springframework:spring-jdbc
%pom_add_dep org.springframework:spring-web "<optional>true</optional>"
%pom_add_dep org.springframework:spring-test "<optional>true</optional>"

# don't add classes containing only stubs into the final jar
%pom_xpath_inject "pom:project/pom:build" \

%mvn_build --


%files -f .mfiles
%dir %{_javadir}/%{name}
%doc license.txt notice.txt

%files javadoc -f .mfiles-javadoc
%doc license.txt notice.txt

* Wed Feb 07 2018 Fedora Release Engineering <> - 1.0.7-9
- Rebuilt for

* Wed Jul 26 2017 Fedora Release Engineering <> - 1.0.7-8
- Rebuilt for

* Fri Feb 10 2017 Fedora Release Engineering <> - 1.0.7-7
- Rebuilt for

* Wed Feb 03 2016 Fedora Release Engineering <> - 1.0.7-6
- Rebuilt for

* Tue Jun 16 2015 Fedora Release Engineering <> - 1.0.7-5
- Rebuilt for

* Wed Mar 11 2015 Michal Srb <> - 1.0.7-4
- Rebuild to remove R on optional dependencies

* Sat Jun 07 2014 Fedora Release Engineering <> - 1.0.7-3
- Rebuilt for

* Wed Apr 02 2014 Michal Srb <> - 1.0.7-2
- Port to Spring Framework 3

* Wed Mar 19 2014 Michal Srb <> - 1.0.7-1
- Initial packaging