%global commit 046b8f7a8aa4e96b9d51aa4bd9664acf0739cf4f %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: tg Version: git%{shortcommit} Release: 1%{?dist} Summary: Command-line interface for Telegram License: GPLv2 URL: https://github.com/vysheng/tg Source0: https://github.com/vysheng/tg/archive/%{commit}/%{name}-%{commit}.tar.gz BuildRequires: lua-devel BuildRequires: openssl-devel BuildRequires: libconfig-devel BuildRequires: readline-devel BuildRequires: python-devel Requires: lua Requires: libconfig Requires: openssl Requires: libconfig Requires: readline Requires: python %description Command-line interface for Telegram. Uses readline interface. Documentation for Telegram API is available here: http://core.telegram.org/api Documentation for MTproto protocol is available here: http://core.telegram.org/mtproto %prep %setup -qn %{name}-%{commit} %configure %build make %{?_smp_mflags} %install mkdir -p %{buildroot}%{_sysconfdir}/telegram install -pm0644 tg-server.pub %{buildroot}%{_sysconfdir}/telegram/server.pub mkdir -p %{buildroot}%{_bindir} install -pm0755 telegram %{buildroot}%{_bindir}/telegram %clean %files %{_bindir}/telegram %config(noreplace) %{_sysconfdir}/telegram/server.pub %doc README.md LICENSE %changelog * Wed Mar 12 2014 Matias Kreder git046b8f7-1 - Initial build.