LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File maven.spec of Package maven (Project home:seoirse)

Name:           maven
Version:        3.2.1
Release:        1.1
License:        Apache-2.0
Url:            http://maven.apache.org
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
Source1:        mvn-bash-completion.sh
Requires: 	java
BuildRequires:  unzip,dos2unix
BuildArch:      noarch

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

%prep
%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
done

%build

%install

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/
done

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

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
/usr/share/java/maven/
/usr/bin/mvn
/usr/bin/mvnDebug
/usr/bin/mvnyjp
/etc/bash_completion.d/mvn.sh

%changelog