%global gitrev 6d0f7a0973cfb %global alphatag 20110529git%{gitrev} %global luaver 5.1 %global lualibdir %{_libdir}/lua/%{luaver} Name: lua-inotify Version: 1.0 Release: 0.2.%{alphatag}%{?dist} Summary: Inotify bindings for Lua License: MIT URL: http://hoelz.ro/projects/linotify # Source only available from Git; instructions below # git clone git://github.com/hoelzro/linotify.git # (cd linotify && git archive --format=tar \ # --prefix=linotify-%%{version}-%%{gitrev}/ %%{gitrev} \ # | xz - ) > linotify-%%{version}-%%{gitrev}.tar.xz Source0: linotify-%{version}-%{gitrev}.tar.xz BuildRequires: lua-devel >= %{luaver} Requires: lua >= %{luaver} %description This is linotify, a binding for Linux's inotify library to Lua. %prep %setup -q -n linotify-%{version}-%{gitrev} # do not strip when installing; preserve modtime (not strictly required) sed -i.nostrip -e 's|install -D -s|install -D -p|' Makefile %build # original CFLAGS is computed using Lua's pkgconfig file, but ours # does not set any. # # Overriding with the default %%{optflags}, and keeping the -fPIC # from the original CFLAGS as the build target is a shared object make %{?_smp_mflags} CFLAGS="%{optflags} -fPIC" %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT INSTALL_PATH=%{lualibdir} %files %doc COPYRIGHT README %{lualibdir}/inotify.so %changelog * Thu Sep 8 2011 Michel Salim <salimma@fedoraproject.org> - 1.0-0.2.20110529git6d0f7a0973cfb - add source checkout instructions - add explanation for overriding CFLAGS * Tue Aug 16 2011 Michel Salim <salimma@fedoraproject.org> - 1.0-0.1.20110529git6d0f7a0973cfb - Initial package