diff --git a/bti.spec b/bti.spec index 990fe4c..dc907d6 100644 --- a/bti.spec +++ b/bti.spec @@ -1,32 +1,24 @@ Name: bti Version: 034 -Release: 21%{?dist} +Release: 22%{?dist} Summary: Bash Twitter Idiocy License: GPLv2 URL: https://github.com/gregkh/bti # kernel.org, not always up to date Source0: https://www.kernel.org/pub/software/web/bti/bti-%{version}.tar.xz -# build against the older JSON API available in EPEL6 -# new JSON blocked by #903009 -Patch0: bti-034-revert_json_change.patch -Patch1: bti-034_json-c_013.patch -# fallback, need to run autotools on these -#Source0: https://github.com/gregkh/bti/archive/%%{version}.tar.gz +Patch0: bti-034_json-c_013.patch BuildRequires: gcc -BuildRequires: libcurl-devel -# for building from github -%if 0%{?el6} -BuildRequires: autoconf automake -%endif -# Not using pkgconfig(...) deps yet since we're still supporting EL5 +BuildRequires: make BuildRequires: pkgconfig -BuildRequires: liboauth-devel -BuildRequires: pcre-devel -BuildRequires: libxml2-devel -BuildRequires: json-c-devel -BuildRequires: make +BuildRequires: pkgconfig(json-c) +BuildRequires: pkgconfig(oauth) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libpcre) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(json-c) +BuildRequires: pkgconfig(oauth) %description Allows you to pipe your bash input to twitter in an easy @@ -34,29 +26,20 @@ and fast manner to annoy the whole world. %prep -%setup -q -%if 0%{?el6} -%patch0 -p1 -b .revert_json_change -%endif -%if 0%{?fedora} >= 28 -%patch1 -p1 -b .json-c_013 -%endif +%autosetup -p1 + %build -# for building from github -%if 0%{?el6} -autoreconf --install --symlink -%endif export LDFLAGS="%{?__global_ldflags} -L%{_libdir}/readline5" %configure -make %{?_smp_mflags} +%make_build %install -make install DESTDIR=$RPM_BUILD_ROOT +%make_install # bash completion -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d -cp -p bti-bashcompletion $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/bti +mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d +cp -p bti-bashcompletion %{buildroot}%{_sysconfdir}/bash_completion.d/bti %files @@ -71,6 +54,10 @@ cp -p bti-bashcompletion $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/bti %changelog +* Sun Jul 11 2021 Michel Alexandre Salim - 034-22 +- Use make macros (https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro) +- Use pkgconfig(...) for dependencies; drop support for EL6 + * Sat Jul 10 2021 Björn Esser - 034-21 - Rebuild for versioned symbols in json-c