0c1f961
%global realname getopt
14d54d7
%global upstream jcomellas
0c1f961
%global debug_package %{nil}
0c1f961
0c1f961
0c1f961
Name:		erlang-%{realname}
0a83082
Version:	0.8.2
e34474a
Release:	1%{?dist}
0c1f961
Summary:	Erlang module to parse command line arguments using the GNU getopt syntax
0c1f961
Group:		Development/Libraries
0c1f961
License:	BSD
0a83082
URL:		http://github.com/%{upstream}/%{realname}
0a83082
%if 0%{?el7}%{?fedora}
0a83082
VCS:		scm:git:https://github.com/%{upstream}/%{realname}.git
0a83082
%endif
0a83082
Source0:	https://github.com/%{upstream}/%{realname}/archive/v%{version}/%{realname}-%{version}.tar.gz
e34474a
Patch1:		getopt-0001-Fix-edoc-compilation.patch
8e4262e
BuildRequires:	erlang-rebar
14d54d7
Requires:	erlang-erts%{?_isa} >= R13B
14d54d7
Requires:	erlang-stdlib%{?_isa} >= R13B
0c1f961
0c1f961
0c1f961
%description
0c1f961
Command-line parsing module that uses a syntax similar to that of GNU getopt.
0c1f961
fb02c99
0c1f961
%prep
0a83082
%setup -q -n %{realname}-%{version}
0c1f961
chmod 0644 examples/*.escript
e34474a
%patch1 -p1 -b .fix_edoc
0c1f961
0c1f961
0c1f961
%build
fb02c99
rebar compile -v
e34474a
rebar doc -v
0c1f961
0c1f961
0c1f961
%check
fc58559
# BEWARE rebar needs bootstrapped getopt in case of an API change
e34474a
rebar eunit -v
0c1f961
0c1f961
0c1f961
%install
c47b033
install -D -m 644 ebin/%{realname}.app %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.app
c47b033
install -D -m 644 ebin/%{realname}.beam %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.beam
0c1f961
0c1f961
0c1f961
%files
8e4262e
%doc LICENSE.txt README.md examples/
0c1f961
%dir %{_libdir}/erlang/lib/%{realname}-%{version}
0c1f961
%dir %{_libdir}/erlang/lib/%{realname}-%{version}/ebin
0c1f961
%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.app
0c1f961
%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.beam
0c1f961
0c1f961
0c1f961
%changelog
e34474a
* Sun Nov 16 2014 Peter Lemenkov <lemenkov@gmail.com> - 0.8.2-1
e34474a
- Ver. 0.8.2
e34474a
0a83082
* Sun Nov 16 2014 Peter Lemenkov <lemenkov@gmail.com> - 0.8.2-0
0a83082
- Bootstrap ver. 0.8.2 with disabled tests
0a83082
65a2da3
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-4
65a2da3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
65a2da3
a71e653
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-3
a71e653
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a71e653
9020036
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-2
9020036
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
9020036
14d54d7
* Sat Mar 02 2013 Peter Lemenkov <lemenkov@gmail.com> - 0.7.0-1
14d54d7
- Ver. 0.7.0
14d54d7
- Removed EL5-related stuff
14d54d7
5952a93
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-2
5952a93
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
5952a93
fc58559
* Fri Dec 21 2012 Peter Lemenkov <lemenkov@gmail.com> - 0.6.0-1
fc58559
- Ver. 0.6.0
fc58559
a051755
* Thu Oct 11 2012 Peter Lemenkov <lemenkov@gmail.com> - 0.5.2-2
a051755
- Rebuild with tests
a051755
- Finally fixed tests on EL5
a051755
c47b033
* Thu Oct 11 2012 Peter Lemenkov <lemenkov@gmail.com> - 0.5.2-1
c47b033
- Ver. 0.5.2
c47b033
7dc5373
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.4-3
7dc5373
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
7dc5373
613a188
* Sun Jun 10 2012 Peter Lemenkov <lemenkov@gmail.com> - 0.4.4-2
613a188
- Workaround for EL5's rebar
613a188
fb02c99
* Sat Jun 02 2012 Peter Lemenkov <lemenkov@gmail.com> - 0.4.4-1
fb02c99
- Ver. 0.4.4
fb02c99
cfc1f71
* Fri Jun 01 2012 Peter Lemenkov <lemenkov@gmail.com> - 0.4.3-2
cfc1f71
- Fix building on EPEL-5 (again)
cfc1f71
- Enabled tests
cfc1f71
8e4262e
* Tue May 15 2012 Peter Lemenkov <lemenkov@gmail.com> - 0.4.3-1
8e4262e
- Ver. 0.4.3
8e4262e
24b0f63
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-5
24b0f63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
24b0f63
004c146
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-4
004c146
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
004c146
03c1518
* Wed Oct  6 2010 Peter Lemenkov <lemenkov@gmail.com> - 0.3-3
03c1518
- Fix building on EPEL-5
03c1518
0c1f961
* Tue Oct  5 2010 Peter Lemenkov <lemenkov@gmail.com> - 0.3-2
0c1f961
- Fixed License tag
0c1f961
- Doc-files now have 644 mode
0c1f961
0c1f961
* Thu Sep 30 2010 Peter Lemenkov <lemenkov@gmail.com> - 0.3-1
0c1f961
- Initial package
0c1f961
- Disabled %%check section until rebar will be available
0c1f961