Difference between revisions of "JBoss specfile"

From CDOT Wiki
Jump to: navigation, search
(New page: ==JBoss AS 5.0.0 Specfile This is the initial JBossAS spec file. It is severely broken, '''DO NOT USE IT''' ==== To Do ==== *Use mvn-jpp to be able to use offline dependency satisfaction ...)
 
 
Line 1: Line 1:
==JBoss AS 5.0.0 Specfile
+
==JBoss AS 5.0.0 Specfile==
 
This is the initial JBossAS spec file.  It is severely broken, '''DO NOT USE IT'''
 
This is the initial JBossAS spec file.  It is severely broken, '''DO NOT USE IT'''
 
==== To Do ====
 
==== To Do ====

Latest revision as of 11:51, 19 October 2008

JBoss AS 5.0.0 Specfile

This is the initial JBossAS spec file. It is severely broken, DO NOT USE IT

To Do

  • Use mvn-jpp to be able to use offline dependency satisfaction
  • Write init script
  • create symlinks for starting and stopping the server
  • fix javadocs and manuals

Specfile

Name:           jboss
Version:        5.0.0
%define upstreamrelease CR2 
Release:        1.CR2%{?dist}
Summary:        A Free Software / Open Source Java EE-based application server

Group:          System/Server
License:        LGPL
URL:            http://jboss.org
Source0:        jboss-5.0.0.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  jpackage-utils

BuildRequires:  java-devel

BuildRequires:  maven2
BuildRequires:  ant

BuildRequires:    maven2-plugin-compiler
BuildRequires:    maven2-plugin-install
BuildRequires:    maven2-plugin-jar
BuildRequires:    maven2-plugin-javadoc
BuildRequires:    maven2-plugin-release
BuildRequires:    maven2-plugin-resources
BuildRequires:    maven2-plugin-surefire

Requires:       jpackage-utils

Requires(post):       jpackage-utils
Requires(postun):     jpackage-utils

Requires:       java

%description

%package javadoc
Summary:        Javadocs for %{name}
Group:          Development/Documentation
Requires:       %{name}-%{version}-%{release}
Requires:       jpackage-utils

%description javadoc
This package contains the API documentation for %{name}.

%package manual
Summary:        Manual for %{name}
Group:          Development/Documentation
Requires:       jpackage-utils
Requires:       %{name}-%{version}-%{release}

%description manual
The manual for %{name}.

%prep
%setup -q

%build

export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL

#Enable these two lines when things are working again
#mvn-jpp \
#-Dmaven.repo.local=$MAVEN_REPO_LOCAL \

#install javadoc:javadoc
./build/build.sh

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.%{upstreamrelease}
cp -R -p build/output/%{name}-%{version}.%{upstreamrelease} $RPM_BUILD_ROOT%{_javadir}

# ENABLE THIS LATER
#mkdir -p $RPM_BUILD_ROOT%{_javadir}
#cp -p [build path to jar]   \
#$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
#
#
#mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
#cp -rp [javadoc directory]  \
#$RPM_BUILD_ROOT%{_javadocdir}/%{name}
#
#install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
#install -pm 644 [path to pom]  \
#$RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
#
#%add_to_maven_depmap org.apache.maven %{name} %{version} JPP %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root,-)
#%{_datadir}/maven2/poms
#%{_mavendepmapfragdir}
%{_javadir}/%{name}-%{version}.%{upstreamrelease}/*
/etc/maven/fragments/jboss
%doc

%files javadoc
%defattr(-,root,root,-)
#%{_javadocdir}/%{name}

%files manual
%defattr(-,root,root,-)
#%doc [manual directory] /*

%changelog