A new user interface for you! Read more...

File abnfc.spec of Package abnfc

%define bname abnfc
Name: %bname
Version: 0.3
Release: 5
Summary: An ABNF parser generator for Erlang
License: Apache-2.0
Group: Development/Tools/Other
URL: https://github.com/nygge/%bname
Source: %bname.tar.xz
BuildArch: noarch
Provides: erlang-%bname = %version-%release

BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: erlang erlang-syntax_tools

%description
%bname is an ABNF parser generator for Erlang.


%prep
%setup -q -n %bname
sed -i '1s|^#.*$|#!%_bindir/escript|' bin/*
sed -i 's|/usr/local/bin/|%_bindir/|' include.mk


%build
make %{?_smp_mflags}


%install
for i in ebin include; do
	install -d -m 0755 %buildroot%_otplibdir/%bname-%version/$i
	install -p -m 0644 $i/* %buildroot%_otplibdir/%bname-%version/$i/
done
install -d -m 0755 %buildroot%_otplibdir/%bname-%version/bin
install -p -m 0755 bin/* %buildroot%_otplibdir/%bname-%version/bin/
install -d -m 0755 %buildroot{%_otpdir/bin,%_bindir}
for i in %buildroot%_otplibdir/%bname-%version/bin/*; do
	f=$(basename $i)
	ln -sf %_otplibdir/%bname-%version/bin/$f %buildroot%_otpdir/bin/
	ln -sf %_otpdir/bin/$f %buildroot%_bindir/
done


%files
%defattr(-,root,root)
%_bindir/*
%_otpdir/bin/*
%_otplibdir/*


%changelog
* Sun Apr 05 2015 Led <ledest@gmail.com> 0.3-5
- cosmetic clean ups

* Fri Apr 03 2015 Led <ledest@gmail.com> 0.3-4
- move symlink from %%_otpdir/erts-*/bin/ to %%_otpdir/bin/

* Mon Mar 30 2015 Led <ledest@gmail.com> 0.3-3
- spec: cosmetic fixes

* Wed Mar 18 2015 Led <ledest@gmail.com> 0.3-2
- fix symlink

* Tue Mar 03 2015 Led <ledest@gmail.com> 0.3-1
- initial build