%define name @PACKAGE@
%define version  @VERSION@
%define release  1

Summary      : KXL -- a visual & sound library
Name         : %{name}
Version      : %{version}
Release      : %{release}
Source       : http://www2.mwnet.or.jp/~fc3srx7/download/%{name}-%{version}.tar.gz
License      : GPL
Group        : System Environment/Libraries
URL          : http://www2.mwnet.or.jp/~fc3srx7/
BuildRoot    : /var/tmp/%{name}-%{version}-root
Requires     : libpulse-simple.so.0()(64bit)

%description
Kacchan X Windows System Liblary (KXL) is a visual & sound library.

%prep
rm -rf ${RPM_BUILD_ROOT}

%setup -q

%build
./configure --prefix=%{_prefix} --libdir %{_libdir}
make CFLAGS+=-DUSE_PULSEAUDIO

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc COPYING ChangeLog README
%doc docs/*
%{_prefix}/share/aclocal/KXL.m4
%{_prefix}/include/*
%{_prefix}/%{_lib}/*

%changelog
* Thu Sep 30 2021 Nathan Mills <Quipyowert2@users.noreply.github.com>
- (1.2.4)
- Fix incompatible pointer type warning.
* Wed Sep 29 2021 Nathan Mills <Quipyowert2@users.noreply.github.com>
- (1.2.3-1)
- Fix some pointer sign warnings
* Fri Mar 6 2020 Nathan Mills <Quipyowert2@users.noreply.github.com>
- (1.2.2-1)
- Fix Valgrind warning "Invalid read of size 8" in KXL_PlaySound
- Zero bitmap data to silence Valgrind warning
* Thu Mar 5 2020 Nathan Mills <Quipyowert2@users.noreply.github.com>
- (1.2.1-1)
- Fix Valgrind warning write(buf) points to uninitialised byte(s)
* Wed Mar 4 2020 Nathan Mills <Quipyowert2@users.noreply.github.com>
- (1.2.0-2)
- Fix rpmbuild failing to find KXL library in lib64.
- (1.2.0-1)
- Use PulseAudio by default for sound output.
* Sun Dec 22 2019 Nathan Mills <Quipyowert2@users.noreply.github.com>
- (1.1.6-1)
- Change obsolete Copyright tag to License tag
- Fix typo in format string.
- Fix commented out KXL_KEY_Bracketright
- Fix "implicit declaration of built-in function" warnings
- Fix a conditional jump or move error from Valgrind
- Fix approx 1MB memory leak in KXL_Font()
* Sat Jan 19 2002 SATO Katsuyoshi <fc3srx7@mwnet.or.jp>
- (1.1.5-1)
- KXL_UpDateRect function was added.
- KXL_UpDateImm function was added.
- KXL_ClearFrameRect function was added.
- KXL_ClearFrameImm function was added.
- KXL_CopyImageRect function was added.
- KXL_CopyImageImm function was added.
- KXL_CopyStretchImageRect function was added.
- KXL_CopyStretchImageImm function was added.
- KXL_PutImageRect function was added.
- KXL_PutImageImm function was added.
- KXL_PutStretchImageRect function was added.
- KXL_PutStretchImageImm function was added.
- Improvement in the speed of various functions.

* Sat Dec 8 2001 SATO Katsuyoshi <fc3srx7@mwnet.or.jp>
- (1.1.4-1)
- The bug in which the expansion image has collapsed was corrected with the KXL_StrechImage function.

* Mon Sep 10 2001 SATO Katsuyoshi <fc3srx7@mwnet.or.jp>
- (1.1.3-1)
- When sound was sounded with single shot, operation corrected the bug which becomes blunt.
- Painting-out processing was added to the KXL_DrawPolygon function.
