Name:           tiemu-skinedit
Version:        1.28
Release:        0.4.20110801git%{?dist}
Summary:        A skin editor for TiEmu

License:        GPLv2
URL:            http://www.ticalc.org/archives/files/fileinfo/232/23201.html

#Source0:        http://www.ticalc.org/pub/unix/skinedit.tar.gz

# Last version of skinedit in git.
Source0:        skinedit-1.28a1.tar.gz

BuildRequires:  gtk2-devel, dos2unix, glibc-devel, gettext, groff
BuildRequires:  autoconf, automake, gettext-devel, libtool

Provides:       skinedit = %{version}-%{release}
Obsoletes:      skinedit < 1.28-0.20110801.fc23

%description
SkinEdit is a Linux/Win32 skin editor for tiemu.

It can read / modify / write the following formats:
VirtualTI v2.1, VirtualTI v2.5, and TiEmu v2.0.

%prep
%setup -qn skinedit-%{version}

# I couldn't get a patch doing this to work, for some reason.
sed 's/mktemp/mkstemp/g' -i src/skinops.c
#rm po/fr.gmo
iconv -f iso8859-1 -t utf-8 README > README.conv && mv -f README.conv README
dos2unix README

%build
autoreconf -fi
%configure --disable-dependency-tracking
make %{?_smp_mflags}
make -C po fr.gmo

%install
rm -rf %{buildroot}
%make_install
%find_lang %{name}

%files -f %{name}.lang
%{_bindir}/tiemu-skinedit
%{_datadir}/tiemu-skinedit
%{_mandir}/man1/tiemu-skinedit.1*
%doc README
%license COPYING


%changelog
* Fri May 11 2018 Ben Rosser <rosser.bjr@gmail.com> - 1.28-0.4.20110801git
- Update for Fedora 28.

* Fri Nov 17 2017 Ben Rosser <rosser.bjr@gmail.com> 1.28-0.3.20110801git
- Rebuild for Fedora 27.

* Thu Jul 20 2017 Ben Rosser <rosser.bjr@gmail.com> 1.28-0.2.20110801git
- Rebuild for Fedora 26 and Mageia 6.

* Sun May 29 2016 Ben Rosser <rosser.bjr@gmail.com> 1.28-0.1.20110801git
- Updated to snapshot last version of tiemu/skinedit in version control
- Renamed package to tiemu-skinedit (as per upstream change)

* Wed Dec 30 2015 Ben Rosser <rosser.bjr@gmail.com> 1.27-1
- Initial package.
- Replace call to mktemp with call to mkstemp.