Applied patch #2762516
[fw/sdcc] / sdcc.spec
index d89fd0cd9b4d83c6a2e9de52255227e90edcbf69..86653d27135c3454f87bc5084b9dbdbf95f751c9 100644 (file)
--- a/sdcc.spec
+++ b/sdcc.spec
@@ -1,62 +1,92 @@
-Summary: Small Device C Compiler
-Name: sdcc
-Version: 2.3.0
-Release: 2
-Copyright: GPL
-Group: Applications/Engineering
-Source: sdcc-2.3.0.tar.gz
-URL: http://sdcc.sourceforge.net/
-Packager: Stephen Williams <steve@icarus.com>
-
-BuildRoot: /tmp/sdcc
+#
+# spec file for package sdcc
+#
+
+Name:          sdcc
+Requires:      /bin/sh
+License:       GPL
+Group:         Applications/Engineering
+Summary:       Small Device C Compiler
+Requires:      sdcc-common
+Version:       2.9.0
+Release:       2
+Source:        %{name}-src-%{version}.tar.gz
+URL:           http://sdcc.sourceforge.net/
+Packager:      Bernhard Held <bernhard AT bernhardheld.de>
+BuildRoot:     %{_tmppath}/%{name}-%{version}-build
 
 %description
-SDC is a C compiler for 8051 class and similar microcontrollers.
-The packge includes the compiler, assemblers and linkers, a device
+SDCC is a C compiler for 8051 class and similar microcontrollers.
+The package includes the compiler, assemblers and linkers, a device
+simulator and a core library. The processors supported (to a varying
+degree) include the 8051, ds390, z80, hc08, and PIC.
+
+%package common
+License:       GPL, LGPL
+Group:         Application/Engineering
+Summary:       Libraries and Header Files for the SDCC C compiler
+Requires:      sdcc
+
+%description common
+SDCC is a C compiler for 8051 class and similar microcontrollers.
+The package includes the compiler, assemblers and linkers, a device
+simulator and a core library. The processors supported (to a varying
+degree) include the 8051, ds390, z80, hc08, and PIC.
+
+%package doc
+License:       GPL
+Group:         Applications/Engineering
+Summary:       Documentation for the SDCC C compiler
+
+%description doc
+SDCC is a C compiler for 8051 class and similar microcontrollers.
+The package includes the compiler, assemblers and linkers, a device
 simulator and a core library. The processors supported (to a varying
-degree) include the 8051, avr, ds390, PIC, i186 and z80.
+degree) include the 8051, ds390, z80, hc08, and PIC.
 
 %prep
 %setup -n sdcc
 
 %build
-./configure --prefix=/usr
-make all
+./configure CFLAGS="$RPM_OPT_FLAGS" --prefix=/usr --enable-doc docdir=$RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}
+make
+cd doc
+make
+cd ..
 
 %install
-make prefix=$RPM_BUILD_ROOT/usr  install
-mv $RPM_BUILD_ROOT/usr/doc/ucsim $RPM_BUILD_ROOT/usr/share/doc
-
-# These files need not be distributed.
-rm -rf $RPM_BUILD_ROOT/usr/share/sdcc/lib/src/ds390/CVS
-rm -rf $RPM_BUILD_ROOT/usr/share/sdcc/lib/src/gbz80/CVS
-rm -rf $RPM_BUILD_ROOT/usr/share/sdcc/lib/src/z80/CVS
+rm -rf $RPM_BUILD_ROOT
+make prefix=$RPM_BUILD_ROOT/usr install
+cd doc
+make install
+cd ..
 
-# These files freak out find-requires if left executable.
-chmod -x $RPM_BUILD_ROOT/usr/share/sdcc/lib/src/ds390/Makefile
-chmod -x $RPM_BUILD_ROOT/usr/share/sdcc/lib/src/gbz80/Makefile
-chmod -x $RPM_BUILD_ROOT/usr/share/sdcc/lib/src/z80/Makefile
+%clean
+rm -rf $RPM_BUILD_ROOT
 
 %files
+%defattr(-,root,root)
+/usr/bin
+
+%files common
+%defattr(-,root,root)
+/usr/share/sdcc/include
+/usr/share/sdcc/lib
+
+%files doc
+%defattr(-,root,root)
+%doc %{_defaultdocdir}
 
-%attr(-,root,root) /usr/bin/as-gbz80
-%attr(-,root,root) /usr/bin/aslink
-%attr(-,root,root) /usr/bin/asx8051
-%attr(-,root,root) /usr/bin/as-z80
-%attr(-,root,root) /usr/bin/link-gbz80
-%attr(-,root,root) /usr/bin/link-z80
-%attr(-,root,root) /usr/bin/packihx
-%attr(-,root,root) /usr/bin/s51
-%attr(-,root,root) /usr/bin/savr
-%attr(-,root,root) /usr/bin/sdcc
-%attr(-,root,root) /usr/bin/sdcdb
-%attr(-,root,root) /usr/bin/sdcpp
-%attr(-,root,root) /usr/bin/sdcppold
-%attr(-,root,root) /usr/bin/serialview
-%attr(-,root,root) /usr/bin/sz80
-
-%attr(-,root,root) /usr/share/sdcc
-
-
-%attr(-,root,root) %doc /usr/share/doc/sdcc
-%attr(-,root,root) %doc /usr/share/doc/ucsim
+%changelog
+* Sun Dec 26 2006 - bernhard AT bernhardheld.de
+- version updated
+* Sun Sep 03 2006 - Christer Weinigel
+- fixed build of doc
+* Tue Mar 09 2004 - bernhard AT bernhardheld.de
+- split into two packages
+* Wed Feb 26 2004 - bernhard AT bernhardheld.de
+- version updated
+* Sun Jan 04 2004 - bernhard AT bernhardheld.de
+- updated
+* Sat Apr 27 2002 - steve AT icarus.com
+- first version from Stephen Williams