File cc65.spec of Package cc65

#
# RPM SPEC file for the cc65 C compiler
#
# 01/30/2014, Spiro Trikaliotis <obs-cc65@spiro.trikaliotis.net>
# 04/15/2010, Robert Hurst <robert@hurst-ri.us>
# 03/08/2001, Ullrich von Bassewitz (uz@cc65.org)
#

###############################################################################
#                                Main package                                 #
###############################################################################

Summary: Crosscompiler/Crossassembler for 6502 systems
%define name cc65
Name: %{name}
%define version 2.19.0.git.13734490652
Version: 2.19.0.git.1396210237.b926301
Release: 1
License: GPL-2.0
Group: Development/Languages/C and C++
Source: %{name}-%{version}.tar.gz
#Source1: cc65-rpmlintrc
Patch0: cc65-2.16.0.sgmltools.patch
Vendor: Oliver Schmidt
#Packager: Spiro Trikaliotis <obs-cc65@spiro.trikaliotis.net>
URL: https://cc65.github.io/cc65/
%ifos linux
BuildRequires: sgmltool
BuildRequires: texinfo
%endif
BuildRoot: %{_topdir}/%{name}-%{version}

%description
A complete cross development package for 65(C)02 systems, including a powerful
macro assembler, a C compiler, linker, librarian and several other tools.

cc65 has C and runtime library support for many of the old 6502 machines,
including the following Commodore machines: VIC20, C16/C116 and Plus/4, C64,
C128, CBM 510 (aka P500), the 600/700 family, newer PET machines (not 2001);
the Apple ][+ and successors; the Atari 8 bit machines; GEOS for the C64, the
C128 and the Apple IIe; the Nintendo Entertainment System (NES); the
Supervision console; the Oric Atmos; the Lynx console.

The libraries are fairly portable, so creating a version for other 6502s
shouldn't be too much work. 

%files
%defattr(644,root,root,755)

%doc LICENSE

%attr(755,root,root) /usr/bin/*
%{_libdir}/cc65




###############################################################################
#                          Documentation subpackage                           #
###############################################################################

%package doc

Requires: %{name} = %{version}
License: GPL-2.0
Summary: Documentation for the cc65 C compiler
Group: Development/Languages/C and C++

%description doc
This package contains the documentation for the cc65 C compiler, mostly
in HTML format. Other formats can be generated from the sources.

%files doc
%defattr(644,root,root,755)
%docdir /html/
%docdir /samples/
%doc LICENSE









###############################################################################
#                                   Build                                     #
###############################################################################



%prep
%setup -q
%patch0 -p1

%build
# Binaries
GIT_SHA=`basename \`pwd\`|sed -e "s/^cc65.*git\.[0-9][0-9]*\.//"`
make -s BUILD_ID="Git $GIT_SHA" PREFIX=/usr datadir=%{_libdir}/cc65 bindir=%{_bindir} all doc


%install
rm -rf $RPM_BUILD_ROOT

make -C src    -s PREFIX=/usr datadir=%{_libdir}/cc65 bindir=%{_bindir} DESTDIR=$RPM_BUILD_ROOT install
make -C libsrc -s PREFIX=/usr datadir=%{_libdir}/cc65 bindir=%{_bindir} DESTDIR=$RPM_BUILD_ROOT install
# make -C doc    -s PREFIX=/usr datadir= {_libdir}/cc65 bindir= {_bindir} DESTDIR=$RPM_BUILD_ROOT install
install util/ca65html $RPM_BUILD_ROOT%{_bindir}


%clean
rm -rf $RPM_BUILD_ROOT



%changelog
* Fri Nov 20 2020 Spiro Trikaliotis <obs-cc65@spiro.trikaliotis.net>
- Bump version number to 2.19
* Thu Mar 26 2020 Spiro Trikaliotis <obs-cc65@spiro.trikaliotis.net>
- Fixes to make it compile again
* Sun Jun 09 2019 Spiro Trikaliotis <obs-cc65@spiro.trikaliotis.net>
- Use BUILD_ID along with GIT_SHA for identification
* Thu May 30 2019 Spiro Trikaliotis <obs-cc65@spiro.trikaliotis.net>
- Bump version number to 2.18
* Thu Mar 08 2018 Spiro Trikaliotis <obs-cc65@spiro.trikaliotis.net>
- Bump version number to 2.17
* Wed Apr 02 2014 Spiro Trikaliotis <obs-cc65@spiro.trikaliotis.net>
- Include GIT_SHA into build.
* Thu Jan 30 2014 Spiro Trikaliotis <obs-cc65@spiro.trikaliotis.net>
- Fixes for Oliver's build system.
* Thu Apr 15 2010 Robert Hurst <robert@hurst-ri.us>
- built for RPM Fusion non-free repository
* Tue Dec 23 2003 Ullrich von Bassewitz <uz@cc65.org>
- Changelog is now in CVS

openSUSE Build Service is sponsored by