%global gitrev ff8e759 %global checkout 20110830git%{gitrev} Name: abootimg Version: 0.6 Release: 3.%{checkout}%{?dist} Summary: Tool for manipulating Android boot images License: GPLv2+ URL: https://gitorious.org/ac100/abootimg # git clone git://gitorious.org/ac100/abootimg.git # cd abootimg ; git archive --format=tar --prefix=abootimg-%%{version}-%%{checkout}/ %%{gitrev} | gzip > abootimg-%%{version}-%%{checkout}.tar.gz Source0: abootimg-%{version}-%{checkout}.tar.gz BuildRequires: libblkid-devel %description abootimg is used to manipulate block devices or files with the special partition format defined by the Android Open Source Project. %prep %setup -q -n abootimg-%{version}-%{checkout} %build echo "#define VERSION_STR \"%{version}\"" > version.h gcc ${RPM_OPT_FLAGS} -DHAS_BLKID -lblkid abootimg.c -o abootimg %install install -D abootimg ${RPM_BUILD_ROOT}/%{_bindir}/abootimg install -D -m 644 -p debian/abootimg.1 ${RPM_BUILD_ROOT}/%{_mandir}/man1/abootimg.1 %files %{_bindir}/abootimg %{_mandir}/man1/* %doc Changelog LICENSE README %changelog * Wed Nov 23 2011 Yanko Kaneti 0.6-3.20110830gitff8e759 - Preserve man page timestamp on install. * Wed Nov 16 2011 Yanko Kaneti 0.6-2.20110830gitff8e759 - Fixed a typo pointed by the first review. * Tue Aug 30 2011 Yanko Kaneti 0.6-1.20110830gitff8e759 - Attempt at packaging.