5004ebb
Name:           bti
b4a480f
Version:        034
d720eeb
Release:        4%{?dist}
c6d0bbb
Summary:        Bash Twitter Idiocy
5004ebb
5004ebb
Group:          Applications/Internet
5004ebb
License:        GPLv2
8313398
URL:            https://github.com/gregkh/bti
a40c28d
# kernel.org, not always up to date
a40c28d
Source0:        https://www.kernel.org/pub/software/web/bti/bti-%{version}.tar.xz
c6d0bbb
# build against the older JSON API available in EPEL6
c6d0bbb
# new JSON blocked by #903009
c6d0bbb
Patch0:         bti-034-revert_json_change.patch
a40c28d
# fallback, need to run autotools on these
c6d0bbb
#Source0:        https://github.com/gregkh/bti/archive/%%{version}.tar.gz
8313398
8313398
%if 0%{?el5}
5004ebb
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
8313398
%endif
5004ebb
01a9e83
%if 0%{?el5}
Michel Alexandre Salim c66d6ab
BuildRequires:  curl-devel
01a9e83
%else
Michel Alexandre Salim c66d6ab
BuildRequires:  libcurl-devel
01a9e83
%endif
1df8bda
# for building from github
c6d0bbb
%if 0%{?el6}
a40c28d
BuildRequires:  autoconf automake
c6d0bbb
%endif
11615a1
# Not using pkgconfig(...) deps yet since we're still supporting EL5
11615a1
BuildRequires:  pkgconfig
11615a1
BuildRequires:  liboauth-devel
11615a1
BuildRequires:  pcre-devel
11615a1
BuildRequires:  libxml2-devel
11615a1
BuildRequires:  json-c-devel
5004ebb
5004ebb
%description
c6d0bbb
Allows you to pipe your bash input to twitter in an easy
2c79c54
and fast manner to annoy the whole world.
5004ebb
5004ebb
5004ebb
%prep
1df8bda
%setup -q
c6d0bbb
%if 0%{?el6}
c6d0bbb
%patch0 -p1 -b .revert_json_change
c6d0bbb
%endif
5004ebb
5004ebb
5004ebb
%build
1df8bda
# for building from github
c6d0bbb
%if 0%{?el6}
c6d0bbb
autoreconf --install --symlink
c6d0bbb
%endif
e651ef9
%configure
e651ef9
make %{?_smp_mflags} LDFLAGS="-L%{_libdir}/readline5"
5004ebb
5004ebb
5004ebb
%install
d7b18af
%if 0%{?el5}
5004ebb
rm -rf $RPM_BUILD_ROOT
d7b18af
%endif
e651ef9
make install DESTDIR=$RPM_BUILD_ROOT
5ce553e
# bash completion
5ce553e
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
5ce553e
cp -p bti-bashcompletion $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/bti
5004ebb
5004ebb
d7b18af
%if 0%{?el5}
5004ebb
%clean
5004ebb
rm -rf $RPM_BUILD_ROOT
d7b18af
%endif
5004ebb
5004ebb
5004ebb
%files
5004ebb
%defattr(-,root,root,-)
c6d0bbb
%doc ChangeLog COPYING README RELEASE-NOTES
1df8bda
%doc bti.example
5ce553e
# Own the directory so that we do not need to Require:
5ce553e
# bash-completion just for one file
e651ef9
%dir %{_sysconfdir}/bash_completion.d
e651ef9
%config(noreplace) %{_sysconfdir}/bash_completion.d/bti
5004ebb
%{_bindir}/bti
e651ef9
%{_bindir}/bti-shrink-urls
5004ebb
%{_mandir}/man1/*
5004ebb
5004ebb
5004ebb
5004ebb
%changelog
d720eeb
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 034-4
d720eeb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
d720eeb
10f6460
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 034-3
10f6460
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
10f6460
c6d0bbb
* Tue Feb 11 2014 Michel Salim <salimma@fedoraproject.org> - 034-2
c6d0bbb
- Build against older JSON API on EPEL6 (bug #903009)
c6d0bbb
- Remove references to identi.ca, no longer supported
c6d0bbb
a40c28d
* Wed Jan 29 2014 Michel Salim <salimma@fedoraproject.org> - 034-1
b4a480f
- Update to 034
b4a480f
ef850a9
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 033-2
ef850a9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
ef850a9
d7b18af
* Thu Jul  4 2013 Michel Salim <salimma@fedoraproject.org> - 033-1
d7b18af
- Update to 033 (switches to new Twitter API)
d7b18af
- Spec clean-up: mark EL5-specific sections
d7b18af
d534041
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 032-3
d534041
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
d534041
747b63d
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 032-2
747b63d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
747b63d
8313398
* Tue Jun 19 2012 Michel Salim <salimma@fedoraproject.org> - 032-1
8313398
- Update to 032
8313398
3f462b3
* Fri Feb 10 2012 Petr Pisar <ppisar@redhat.com> - 031-3
3f462b3
- Rebuild against PCRE 8.30
3f462b3
9591c58
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 031-2
9591c58
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
9591c58
Michel Alexandre Salim c66d6ab
* Tue Mar 22 2011 Michel Salim <salimma@fedoraproject.org> - 031-1
Michel Alexandre Salim c66d6ab
- Update to 031
Michel Alexandre Salim c66d6ab
988f89e
* Sat Mar 19 2011 Michel Salim <salimma@fedoraproject.org> - 030-3
988f89e
- Improved comment marker fix, now safer and handle lines containing both
988f89e
  non-marker and marker '#'s
988f89e
6669555
* Fri Mar 18 2011 Michel Salim <salimma@fedoraproject.org> - 030-2
6669555
- Improve detection of comment marker in configuration file
6669555
f21c1a1
* Fri Mar 18 2011 Michel Salim <salimma@fedoraproject.org> - 030-1
Michel Alexandre Salim c66d6ab
- Update to 030
f21c1a1
a0b7be3
* Sat Mar 12 2011 Michel Salim <salimma@fedoraproject.org> - 029-1
Michel Alexandre Salim c66d6ab
- Update to 029
a0b7be3
d347c8f
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 028-4
d347c8f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d347c8f
2fe97b7
* Sat Nov  6 2010 Michel Salim <salimma@fedoraproject.org> - 028-3
2fe97b7
- Rebuilt for new libxml2 on Rawhide
2fe97b7
Jesse Keating c79eb4b
* Wed Sep 29 2010 jkeating - 028-2
Jesse Keating c79eb4b
- Rebuilt for gcc bug 634757
Jesse Keating c79eb4b
a1a72b2
* Wed Sep  8 2010 Michel Salim <salimma@fedoraproject.org> - 028-1
a1a72b2
- Update to 028
a1a72b2
91247fa
* Thu May 20 2010 Michel Salim <salimma@fedoraproject.org> - 026-1
91247fa
- Update to 026
91247fa
57af483
* Wed Aug 19 2009 Michel Salim <salimma@fedoraproject.org> - 023-1
57af483
- Update to 023
57af483
- Build against readline v5, due to licensing incompatibilities with v6
57af483
  (bug #511301)
57af483
8715b09
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 015-2
8715b09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
8715b09
028b3e9
* Fri Mar 13 2009 Michel Salim <salimma@fedoraproject.org> - 015-1
028b3e9
- Update to 015
028b3e9
f1b7e8a
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 014-2
f1b7e8a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f1b7e8a
5ce553e
* Mon Feb 23 2009 Michel Salim <salimma@fedoraproject.org> - 014-1
5ce553e
- Update to 014
5ce553e
2c79c54
* Mon Dec 29 2008 Michel Salim <salimma@fedoraproject.org> - 007-1
2c79c54
- Update to 0.0.7
2c79c54
5004ebb
* Thu Aug 28 2008 Michel Salim <salimma@fedoraproject.org> - 005-1
5004ebb
- Initial package