File openmrs.spec of Package openmrs
#
# spec file for package openmrs (Version 1.7.0rc)
#
# The contents of this file are subject to the OpenMRS Public License
# Version 1.0 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://license.openmrs.org
#
# Copyright (C) OpenMRS, LLC. All Rights Reserved.
# norootforbuild
# icecream 0
Name: openmrs
Version: 1.7.0
Release: rc
Summary: An enterprise electronic medical record system platform
License: OpenMRS Public License
Group: Applications/Medical
URL: http://www.openmrs.org/
BuildArch: noarch
Source0: openmrs-1.7.0-src.tar.gz
%define name openmrs
%define full_name %{name}
%define version 1.7.0
%define release rc
%define tomcat6dir tomcat6
%define tomcat6appsdir /srv/%{tomcat6dir}/webapps
%define tomcat6ctxdir %{_sysconfdir}/%{tomcat6dir}/Catalina/localhost
%define section free
%define webapps openmrs.war
%define jdkmajorver 1.6
%define legacyver 1.5
BuildRequires: java-1.6.0-devel
BuildRequires: ant >= 0:1.6.5
BuildRequires: ant-apache-oro
Requires: servlet
Requires: tomcat6
Requires: mysql
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: /usr/sbin/useradd, /usr/sbin/groupadd
%description
OpenMRS is a community-developed, open-source, enterprise electronic medical record
system platform. We've come together to specifically respond to those actively building
and managing health systems in the developing world, where AIDS, tuberculosis, and malaria
afflict the lives of millions. Our mission is to foster self-sustaining health information
technology implementations in these environments through peer mentorship, proactive
collaboration, and a code base that equals or surpasses proprietary equivalents.
%prep
rm -rf $RPM_BUILD_ROOT
%setup -n %{name}-%{version}-src -q
%build
ant package-web
%install
# tomcat 6 webapps
install -d -m 755 $RPM_BUILD_ROOT%{tomcat6appsdir}
cp -pr dist/%{webapps} $RPM_BUILD_ROOT%{tomcat6appsdir}/$webapp
%pre
/usr/sbin/groupadd -r tomcat 2> /dev/null || :
/usr/sbin/useradd -r -g tomcat -s /bin/bash \
-c "Tomcat - Apache Servlet/JSP Engine" \
-d %{_datadir}/%{tomcat6dir} tomcat 2> /dev/null || :
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc LICENSE README
%defattr(-,tomcat,tomcat)
%dir /srv/%{tomcat6dir}
%dir /srv/%{tomcat6dir}/webapps
%{tomcat6appsdir}/%{webapps}
%changelog
* Fri Aug 06 2010 sunbiz@gmail.com
- Initial package created with version 1.7.0 b14798