Skip to content

Instantly share code, notes, and snippets.

@kazuhisya
Created July 5, 2011 09:03
Show Gist options
  • Save kazuhisya/1064519 to your computer and use it in GitHub Desktop.
Save kazuhisya/1064519 to your computer and use it in GitHub Desktop.
groovy rpm
%define groovy_root_dir /usr/share
Name: groovy
Version: 2.3.7
Release: 1%{?dist}
License: See: http://groovy.codehaus.org/license.html
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: Development/Languages/Groovy
Summary: Contains the base system for executing groovy scripts.
SOurce: http://dl.bintray.com/groovy/maven/groovy-binary-%{version}.zip
BuildArch: noarch
BuildRequires: unzip
Packager: Kazuhisa Hara <[email protected]>
%description
Groovy is an object-oriented programming language for the Java Platform as an
alternative to the Java programming language. It can be viewed as a scripting
language for the Java Platform, as it has features similar to those of Python,
Ruby, Perl, and Smalltalk. In some contexts, the name JSR 241 is used as an
alternate identifier for the Groovy language.
%prep
%setup -n %{name}-%{version}
rm bin/*.bat
rm -rf $RPM_BUILD_ROOT
%build
%install
install -d $RPM_BUILD_ROOT/%{groovy_root_dir}/groovy/lib
install -p lib/* $RPM_BUILD_ROOT/%{groovy_root_dir}/groovy/lib
install -d $RPM_BUILD_ROOT/%{groovy_root_dir}/groovy/conf
install -p conf/* $RPM_BUILD_ROOT/%{groovy_root_dir}/groovy/conf
install -d $RPM_BUILD_ROOT/%{groovy_root_dir}/groovy/embeddable
install -p embeddable/* $RPM_BUILD_ROOT/%{groovy_root_dir}/groovy/embeddable
install -d $RPM_BUILD_ROOT/%{groovy_root_dir}/groovy/bin
install -p bin/* $RPM_BUILD_ROOT/%{groovy_root_dir}/groovy/bin
mkdir -p $RPM_BUILD_ROOT/usr/bin
for file in grape groovy groovy.icns groovy.ico groovyConsole groovyc groovydoc groovysh java2groovy startGroovy ; do
ln -s %{groovy_root_dir}/groovy/bin/$file $RPM_BUILD_ROOT/usr/bin
done
install -d $RPM_BUILD_ROOT/etc/profile.d
echo "export GROOVY_HOME=%{groovy_root_dir}/%{name}" >$RPM_BUILD_ROOT/etc/profile.d/groovy.sh
echo "setenv GROOVY_HOME %{groovy_root_dir}/%{name}" >$RPM_BUILD_ROOT/etc/profile.d/groovy.csh
%clean
rm -rf "$RPM_BUILD_ROOT"
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%defattr(-,root,root)
/etc/profile.d/groovy.csh
/etc/profile.d/groovy.sh
/usr/bin/grape
/usr/bin/groovy
/usr/bin/groovy.icns
/usr/bin/groovy.ico
/usr/bin/groovyConsole
/usr/bin/groovyc
/usr/bin/groovydoc
/usr/bin/groovysh
/usr/bin/java2groovy
/usr/bin/startGroovy
/usr/share/groovy
%changelog
* Thu Nov 6 2014 Kazuhisa Hara <[email protected]>
- Updated to Groovy version 2.3.7
* Tue Sep 6 2011 Kazuhisa Hara <[email protected]>
- Updated to Groovy version 1.8.2
* Fri Jul 22 2011 Kazuhisa Hara <[email protected]>
- Updated to Groovy version 1.8.1
* Tue Jul 5 2011 Kazuhisa Hara <[email protected]>
- Updated to Groovy version 1.8.0
* Sat Feb 20 2010 Federico Pedemonte <[email protected]>
- Updated to Groovy version 1.7.1
* Sat Oct 03 2009 Federico Pedemonte <[email protected]>
- Updated to Groovy version 1.6.5
- Removed hard-coded path/version number from spec file
* Thu Sep 10 2009 Federico Pedemonte <[email protected]>
- Updated to Groovy version 1.6.4
- Removed hard-coded path/version number from spec file
* Sun May 17 2009 Federico Pedemonte <[email protected]>
- Updated to Groovy version 1.6.3
* Wed Apr 29 2009 Federico Pedemonte <[email protected]>
- Updated to Groovy version 1.6.2
* Wed Apr 08 2009 Federico Pedemonte <[email protected]>
- Updated to Groovy version 1.6.1
* Wed Feb 18 2009 Federico Pedemonte <[email protected]>
- Updated to Groovy version 1.6
NAME := groovy
VERSION := $(shell grep Version: $(NAME).spec | cut -d " " -f 2)
rpm:
spectool -g $(NAME).spec
mkdir -p dist/{BUILD,RPMS,SPECS,SOURCES,SRPMS,install}
mv $(NAME)-*.zip dist/SOURCES/
rpmbuild -ba \
--define "_topdir $(PWD)/dist" \
--define "buildroot $(PWD)/dist/install" \
--clean \
$(NAME).spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment