%global namedreltag .Beta1 %global namedversion %{version}%{?namedreltag} Name: httpserver Version: 1.0.0 Release: 0.1%{namedreltag}%{?dist} Summary: JBoss httpserver Group: Development/Libraries License: GPLv2 with exceptions URL: https://github.com/jbossas/httpserver # git clone git://github.com/jbossas/httpserver.git # cd httpserver/ && git archive --format=tar --prefix=httpserver-1.0.0.Beta1/ 1.0.0.Beta1 | xz > httpserver-1.0.0.Beta1.tar.xz Source0: %{name}-%{namedversion}.tar.xz BuildArch: noarch BuildRequires: jpackage-utils BuildRequires: java-devel BuildRequires: maven BuildRequires: maven-compiler-plugin BuildRequires: maven-install-plugin BuildRequires: maven-jar-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-release-plugin BuildRequires: maven-resources-plugin BuildRequires: maven-surefire-plugin BuildRequires: maven-surefire-provider-junit4 BuildRequires: junit4 BuildRequires: jboss-parent Requires: jpackage-utils Requires: java %description This package contains JBoss httpserver %package javadoc Summary: Javadocs for %{name} Group: Documentation Requires: jpackage-utils %description javadoc This package contains the API documentation for %{name}. %prep %setup -q -n %{name}-%{namedversion} %build mvn-rpmbuild install javadoc:aggregate %install install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/jboss cp -p target/%{name}-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/jboss/%{name}.jar install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name} cp -rp target/site/apidocs $RPM_BUILD_ROOT%{_javadocdir}/%{name} install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.jboss-%{name}.pom %add_maven_depmap JPP.jboss-%{name}.pom jboss/%{name}.jar %files %{_mavenpomdir}/* %{_mavendepmapfragdir}/* %{_javadir}/* %doc %files javadoc %{_javadocdir}/%{name} %changelog * Thu Aug 11 2011 Marek Goldmann 1.0.0-0.1.Beta1 - Initial packaging