From b7b0ed7c3328ff98beaf7d2b78445b1bddd802d3 Mon Sep 17 00:00:00 2001 From: Trond Danielsen Date: Mar 02 2007 16:10:42 +0000 Subject: auto-import sdcc-2.6.0-8 on branch FC-6 from sdcc-2.6.0-8.src.rpm --- diff --git a/.cvsignore b/.cvsignore index e69de29..e7b97a7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +sdcc-src-2.6.0.tar.gz diff --git a/README.fedora b/README.fedora new file mode 100644 index 0000000..1993c3a --- /dev/null +++ b/README.fedora @@ -0,0 +1,4 @@ +Many of the executables in SDCC have very generic names. Therefore the binaries +are installed into $PREFIX/libexec/sdcc/, and symlinks with prefix sdcc- are +created in $PREFIX/bin. If this is a problem for you, you can add +$PREFIX/libexec/sdcc/ to you path. diff --git a/sdcc-2.6.0-configure.diff b/sdcc-2.6.0-configure.diff new file mode 100644 index 0000000..1439c63 --- /dev/null +++ b/sdcc-2.6.0-configure.diff @@ -0,0 +1,60 @@ +diff -ur sdcc.orig/configure sdcc/configure +--- sdcc.orig/configure 2006-07-25 14:56:37.000000000 +0200 ++++ sdcc/configure 2007-02-06 10:34:36.000000000 +0100 +@@ -4523,7 +4523,7 @@ + echo "${ECHO_T}$sdcc_cv_CCggdb" >&6 + + if test "$sdcc_cv_CCggdb" = "yes"; then +- CFLAGS="-ggdb ${CFLAGS}" ++: CFLAGS="-ggdb ${CFLAGS}" + fi + + +diff -ur sdcc.orig/configure.in sdcc/configure.in +--- sdcc.orig/configure.in 2006-07-25 14:56:37.000000000 +0200 ++++ sdcc/configure.in 2007-02-06 10:33:56.000000000 +0100 +@@ -327,7 +327,7 @@ + # This is the first time when CFLAGS are set/modified!! + adl_DD_COPT(CC, ggdb) + if test "$sdcc_cv_CCggdb" = "yes"; then +- CFLAGS="-ggdb ${CFLAGS}" ++: CFLAGS="-ggdb ${CFLAGS}" + fi + + adl_DD_COPT(CC, pipe) +diff -ur sdcc.orig/sim/ucsim/configure sdcc/sim/ucsim/configure +--- sdcc.orig/sim/ucsim/configure 2006-06-18 23:08:05.000000000 +0200 ++++ sdcc/sim/ucsim/configure 2007-02-06 10:36:13.000000000 +0100 +@@ -11816,11 +11816,11 @@ + echo "${ECHO_T}$ucsim_cv_CXXgstabs" >&6 + + if test "$ucsim_cv_CXXgstabs" = "yes"; then +- gopt="-gstabs+ -g3" ++: gopt="-gstabs+ -g3" + elif test "$ucsim_cv_CXXggdb" = "yes"; then +- gopt="-ggdb -g3" ++: gopt="-ggdb -g3" + else +- gopt="-g" ++: gopt="-g" + fi + if test "$CXXFLAGS"x = x ;then + CXXFLAGS="$gopt" +diff -ur sdcc.orig/sim/ucsim/configure.in sdcc/sim/ucsim/configure.in +--- sdcc.orig/sim/ucsim/configure.in 2006-06-18 23:08:05.000000000 +0200 ++++ sdcc/sim/ucsim/configure.in 2007-02-06 10:35:38.000000000 +0100 +@@ -387,11 +387,11 @@ + DD_COPT(CXX, ggdb) + DD_COPT(CXX, gstabs) + if test "$ucsim_cv_CXXgstabs" = "yes"; then +- gopt="-gstabs+ -g3" ++: gopt="-gstabs+ -g3" + elif test "$ucsim_cv_CXXggdb" = "yes"; then +- gopt="-ggdb -g3" ++: gopt="-ggdb -g3" + else +- gopt="-g" ++: gopt="-g" + fi + if test "$CXXFLAGS"x = x ;then + CXXFLAGS="$gopt" diff --git a/sdcc.spec b/sdcc.spec new file mode 100644 index 0000000..19a8f0b --- /dev/null +++ b/sdcc.spec @@ -0,0 +1,142 @@ +Name: sdcc +Version: 2.6.0 +Release: 8%{?dist} +Summary: Small Device C Compiler + +Group: Applications/Engineering +License: GPL +URL: http://sdcc.sourceforge.net +Source0: http://downloads.sourceforge.net/%{name}/%{name}-src-%{version}.tar.gz +Source1: README.fedora +Patch0: sdcc-2.6.0-configure.diff +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: flex +BuildRequires: bison +BuildRequires: lyx +BuildRequires: latex2html +BuildRequires: gc-devel + + +%description +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 libc-sources +Summary: Small Device C Compiler +Group: Applications/Engineering +License: GPL +Requires: sdcc = %{version}-%{release} + +%description libc-sources +SDCC is a C compiler for 8051 class and similar microcontrollers. +This package includes the sources for the C library, and is only neccessary +if you want to modify the C library or as reference of how it works. + +%prep +%setup -q -n sdcc +%patch -p1 +find -name '*.[ch]' -exec chmod -x '{}' \; + +# Extract %%__os_install_post into os_install_post~ +cat << \EOF > os_install_post~ +%__os_install_post +EOF + +# Generate customized brp-*scripts +cat os_install_post~ | while read a x y; do +case $a in +# Prevent brp-strip* from trying to handle foreign binaries +*/brp-strip*) + b=$(basename $a) + sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b + chmod a+x $b + ;; +esac +done + +sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \ +< os_install_post~ > os_install_post + + +%build +%configure --enable-doc --enable-libgc STRIP=: +make %{?_smp_mflags} Q= + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT Q= +mv $RPM_BUILD_ROOT/%{_datadir}/%{name}/doc installed-docs +install -m 644 %SOURCE1 installed-docs +mkdir -p $RPM_BUILD_ROOT/%{_datadir}/emacs/site-lisp +mv $RPM_BUILD_ROOT/%{_bindir}/*.el $RPM_BUILD_ROOT/%{_datadir}/emacs/site-lisp +find $RPM_BUILD_ROOT -type f -name \*.c -exec chmod a-x '{}' \; +mkdir -p $RPM_BUILD_ROOT/%{_libexecdir}/sdcc +mv $RPM_BUILD_ROOT/%{_bindir}/* $RPM_BUILD_ROOT/%{_libexecdir}/sdcc +pushd $RPM_BUILD_ROOT/%{_bindir} +for x in ../libexec/sdcc/*; do ln -s $x sdcc-$(basename $x); done +popd + +%define __os_install_post . ./os_install_post + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc installed-docs/* +%{_bindir}/* +%{_libexecdir}/%{name} +%{_datadir}/%{name} +%{_datadir}/emacs +%exclude %{_datadir}/%{name}/lib/src +%exclude %{_datadir}/%{name}/lib/*/*.asm + + +%files libc-sources +%defattr(-,root,root,-) +%{_datadir}/%{name}/lib/src +%{_datadir}/%{name}/lib/*/*.asm + +%changelog +* Thu Feb 29 2007 Trond Danielsen - 2.6.0-8 +- Added Fedora specific README file. +- Corrected permissions on files in debuginfo package. + +* Wed Feb 28 2007 Trond Danielsen - 2.6.0-7 +- Updated requirement for libc-source to include version and release number. + +* Wed Feb 28 2007 Trond Danielsen - 2.6.0-6 +- Renamed source code package to libc-sources. +- Change BuildRequire from byacc to bison. +- Added "Require: sdcc" to libc-sources package. +- Empty %doc entry removed. +- Updated description of libc-sources package. + +* Tue Feb 27 2007 Trond Danielsen - 2.6.0-5 +- Source URL updated. +- Separate src package created. +- Disabling stripping of binaries to get proper debuginfo package. + +* Mon Feb 26 2007 Ralf Corsépius - 2.6.0-4 +- Add sdcc-2.6.0-configure.diff. +- Pass Q= to make to make building verbose. +- Add __os_install_post post-hacks to prevent brp-strip from processing + foreign binaries. + +* Mon Feb 26 2007 Trond Danielsen - 2.6.0-3 +- Broken symlinks fixed. + +* Mon Feb 5 2007 Trond Danielsen - 2.6.0-2 +- Emacs scripts moved to the correct folder. +- Moved binaries to /urs/libexec/sdcc, added symlinks with sdcc- prefix in /usr/bin. +- Various rpmlint errors fixed. + +* Thu Feb 1 2007 Trond Danielsen - 2.6.0-1 +- Initial version. + diff --git a/sources b/sources index e69de29..7799c1e 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +70d6036226d852995237f30c5cb50960 sdcc-src-2.6.0.tar.gz