# disable debuginfo and strip
%global debug_package %{nil}
%global __os_install_post %{nil}

%global commit ec5812343b19166d4139b9ae7c15756ae4d8f26b
#global old_commit 5aa49f4a9654d6beb1e7e6791bec3915c9145f61
%global shortcommit %(c=%{commit}; echo ${c:0:7})

Name:           atari-tools
Version:        0
Release:        2%{?dist}
Summary:        Atari Disk Tools

License:        GPL
URL:            https://github.com/jhallen/atari-tools/
Source0:        https://github.com/jhallen/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz

#BuildRequires:  
#Requires:       

%description
Use ATR to manipulate .atr disk image files.

Use ATR2IMD and IMD2ATR to convert between .atr disk images and .img disk images. These are useful if you are trying to read Atari disks on an IBM PC using ImageDisk.

Use detok to convert .m65 tokenized assembly source files to ASCII.

%prep
%setup -qn %{name}-%{commit}


%build
%make_build
gcc -o atr2imd atr2imd.c
gcc -o imd2atr imd2atr.c


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
cp -a atr atr2imd imd2atr $RPM_BUILD_ROOT%{_bindir}


%files
%doc *.txt
%{_bindir}/*


%changelog
* Sat May 12 2018 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0-2
- update to upstream

* Mon Jan 29 2018 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk>
- initial release
