56cbf20
%global codate 20230721
56cbf20
%global commit0 7e127fee6a3981f6b0a50ce9910267cd501e09d4
56cbf20
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
56cbf20
b2d662b
%global gitrev ff8e759
b2d662b
%global checkout 20110830git%{gitrev}
b2d662b
b2d662b
Name:           abootimg
b2d662b
Version:        0.6
56cbf20
Release:        %autorelease -s %{codate}git%{shortcommit0}
b2d662b
Summary:        Tool for manipulating Android boot images
b2d662b
56cbf20
License:        GPL-2.0-or-later
56cbf20
URL:            https://github.com/ggrandou/abootimg
56cbf20
Source0:        https://github.com/ggrandou/abootimg/archive/%{commit0}.tar.gz#/%{name}-%{version}-%{shortcommit0}.tar.gz
b2d662b
4144342
BuildRequires:  gcc
b2d662b
BuildRequires:  libblkid-devel
b2d662b
b2d662b
%description
b2d662b
abootimg is used to manipulate block devices or files with the special 
b2d662b
partition format defined by the Android Open Source Project.
b2d662b
b2d662b
b2d662b
%prep
56cbf20
%autosetup -p1 -n %{name}-%{commit0}
b2d662b
b2d662b
b2d662b
%build
b2d662b
echo "#define VERSION_STR \"%{version}\"" > version.h
b2d662b
gcc ${RPM_OPT_FLAGS} -DHAS_BLKID -lblkid abootimg.c -o abootimg
b2d662b
b2d662b
b2d662b
%install
b2d662b
install -D abootimg ${RPM_BUILD_ROOT}/%{_bindir}/abootimg
b2d662b
install -D -m 644 -p debian/abootimg.1 ${RPM_BUILD_ROOT}/%{_mandir}/man1/abootimg.1
b2d662b
b2d662b
b2d662b
%files
56cbf20
%doc Changelog README
56cbf20
%license LICENSE
b2d662b
%{_bindir}/abootimg
b2d662b
%{_mandir}/man1/*
b2d662b
b2d662b
b2d662b
%changelog
56cbf20
%autochangelog