File maven.spec of Package maven

Name:           maven
Version:        3.2.1
Release:        1.1
License:        Apache-2.0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Group:          Development/Tools/Building
Summary:        Maven is a software project management and comprehension tool
Source:         apache-maven-%{version}-bin.tar.bz2
Requires: 	java
BuildRequires:  unzip,dos2unix
BuildArch:      noarch

A software project management and comprehension tool. 
Based on the concept of a project object model (POM), Maven can 
manage a project's build, reporting and documentation from a 
central piece of information

%setup -n apache-maven-%{version}
rm bin/*.bat
for winfile in conf/settings.xml bin/m2.conf lib/ext/README.txt; do
	dos2unix $winfile
	chmod a-x $winfile



install -d $RPM_BUILD_ROOT/usr/share/java/maven/bin
install -p bin/m2.conf $RPM_BUILD_ROOT/usr/share/java/maven/bin
install -p bin/mvn $RPM_BUILD_ROOT/usr/share/java/maven/bin
install -p bin/mvnDebug $RPM_BUILD_ROOT/usr/share/java/maven/bin
install -p bin/mvnyjp $RPM_BUILD_ROOT/usr/share/java/maven/bin

install -d $RPM_BUILD_ROOT/usr/share/java/maven/lib
cp -R lib/* $RPM_BUILD_ROOT/usr/share/java/maven/lib

install -d $RPM_BUILD_ROOT/usr/share/java/maven/conf
cp -R conf/* $RPM_BUILD_ROOT/usr/share/java/maven/conf

install -d $RPM_BUILD_ROOT/usr/share/java/maven/boot
install -p boot/* $RPM_BUILD_ROOT/usr/share/java/maven/boot

install -d $RPM_BUILD_ROOT/usr/bin
for binary in mvn mvnDebug mvnyjp; do 
	%__ln_s /usr/share/java/maven/bin/$binary $RPM_BUILD_ROOT/usr/bin/

install -d $RPM_BUILD_ROOT/etc/bash_completion.d/
install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/etc/bash_completion.d/

rm -rf "$RPM_BUILD_ROOT"


openSUSE Build Service is sponsored by