A new user interface for you!

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

%bname is an ABNF parser generator for Erlang.

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

make %{?_smp_mflags}

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/
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/


* 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