%global git_rev 7946e2c Name: linenoise Version: 0 Release: 1.git%{git_rev}%{?dist} Summary: Minimal replacement for readline License: BSD URL: https://github.com/tadmarshall/linenoise Source0: https://github.com/tadmarshall/linenoise/tarball/%{git_rev}/%{name}-%{git_rev}.tar.gz Patch0: %{name}-build-shared-lib.patch Patch1: %{name}-symbol-visibility.patch %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description Linenoise is a replacement for the readline line-editing library with the goal of being smaller. %description devel This package contains files needed for developing software that uses %{name}. %prep %setup -q -n tadmarshall-%{name}-%{git_rev} %patch0 -p1 %patch1 -p1 %build LIBDIR="%{_libdir}" INCLUDEDIR="%{_includedir}" CFLAGS="%{optflags}" make %{?_smp_mflags} %install LIBDIR="%{_libdir}" INCLUDEDIR="%{_includedir}" CFLAGS="%{optflags}" make %{?_smp_mflags} DESTDIR="%{buildroot}" install %files %doc README.markdown %{_libdir}/liblinenoise.so.* %files devel %{_includedir}/linenoise.h %{_libdir}/liblinenoise.so %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %changelog * Tue Jan 08 2013 Dan Callaghan - 0-1.git7946e2c - initial version