%define _disable_ld_as_needed 1 %define _disable_ld_no_undefined 1 # To fix paths, Racket performs direct ELF surgery during install. D'oh! # (see collects/setup/unixstyle-install.rkt) # That's why we end up with slightly different executables that share the same # build ID, and this breaks debuginfo extraction. %define debug_package %{nil} Name: racket Version: 5.2 Release: %mkrel 1 Summary: Racket is a Scheme implementation License: LGPLv2+ Group: Development/Other Url: http://www.racket-lang.org Source0: http://download.racket-lang.org/installers/%{version}/racket/%{name}-%{version}-src-unix.tgz Source1: racket.png BuildRequires: spec-helper >= 0.12 BuildRequires: imagemagick %ifarch x86_64 BuildRequires: lib64jpeg62 %else BuildRequires: libjpeg62 %endif BuildRequires: png-devel %define major %{version} %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d Requires: %{libname} = %{version} %description Racket is a Scheme implementation. It implements the language as described in the Revised^5 Report on the Algorithmic Language Scheme and adds numerous extensions. %package -n %{libname} Summary: Main library for %{name} Group: System/Libraries Provides: %{name} = %{version}-%{release} %description -n %{libname} This package contains the library needed to run programs dynamically linked with %{name}. %package -n %{develname} Summary: Headers for developing programs that will use %{name} Group: Development/Other Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{develname} This package contains the headers that programmers will need to develop applications which will use %{name}. %package -n g%{name} Summary: Racket graphical Scheme implementation Group: Development/Other Requires: %{name} = %{version} %description -n g%{name} GRacket is the Racket's graphical Scheme implementation. It embeds and extends Racket with a graphical user interface (GUI) toolbox. %package -n dr%{name} Summary: Racket graphical development environment Group: Development/Other Requires: g%{name} = %{version} %description -n dr%{name} DrRacket is the graphical development environment for creating Racket and GRacket applications. %prep %setup -q %build cd src %configure2_5x \ --enable-shared %make %install rm -rf %{buildroot} mkdir %{buildroot} cd src export LD_LIBRARY_PATH=%{buildroot}%{_libdir} export PLT_SETUP_OPTIONS="-j 1" %makeinstall_std # correct installation install -d -m 755 %{buildroot}%{_datadir} install -d -m 755 %{buildroot}%{_libdir}/%{name} # correct perms find %{buildroot}%{_libdir}/%{name}/collects -type d -exec chmod 755 {} \; find %{buildroot}%{_datadir}/%{name}/doc -type d -exec chmod 755 {} \; %multiarch_includes %{buildroot}%{_includedir}/racket/mzconfig.h mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/%{name} mv README $RPM_BUILD_ROOT%{_defaultdocdir}/%{name} mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications cat > $RPM_BUILD_ROOT%{_datadir}/applications/drracket.desktop << EOF [Desktop Entry] Name=DrRacket Comment=Scheme IDE Exec=drracket Icon=drracket Terminal=false Type=Application StartupNotify=true Categories=Development;IDE; EOF mkdir -p %{buildroot}%{_datadir}/pixmaps mkdir -p %{buildroot}%{_iconsdir}/hicolor/{16x16,32x32,48x48,64x64}/apps convert -scale "48x48" %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/drracket.png convert -scale "16x16" %{SOURCE1} %{buildroot}%{_iconsdir}/hicolor/16x16/apps/drracket.png convert -scale "32x32" %{SOURCE1} %{buildroot}%{_iconsdir}/hicolor/32x32/apps/drracket.png convert -scale "48x48" %{SOURCE1} %{buildroot}%{_iconsdir}/hicolor/48x48/apps/drracket.png convert -scale "64x64" %{SOURCE1} %{buildroot}%{_iconsdir}/hicolor/64x64/apps/drracket.png %files %defattr(-,root,root) %doc README %{_libdir}/%{name} %{_bindir}/* %{_mandir}/man1/* %{_datadir}/%{name} %exclude %{_bindir}/gracket %exclude %{_bindir}/drracket %exclude %{_mandir}/man1/gracket.1* %exclude %{_mandir}/man1/drracket.1* %exclude %{_libdir}/%{name}/collects/mred %exclude %{_libdir}/%{name}/collects/drracket %exclude %{_datadir}/%{name}/doc/drracket %files -n %{libname} %defattr(-,root,root) %{_libdir}/libracket3m-%{version}.so %files -n %{develname} %defattr(-,root,root) %{_libdir}/libracket3m.so %{_libdir}/*.la %{_includedir}/* %files -n gracket %defattr(-,root,root) %{_libdir}/%{name}/collects/mred %{_bindir}/gracket %{_mandir}/man1/gracket.1* %files -n drracket %defattr(-,root,root) %{_libdir}/%{name}/collects/drracket %{_bindir}/drracket %{_mandir}/man1/drracket.1* %{_datadir}/%{name}/doc/drracket %{_datadir}/pixmaps/drracket.png %{_iconsdir}/hicolor/16x16/apps/drracket.png %{_iconsdir}/hicolor/32x32/apps/drracket.png %{_iconsdir}/hicolor/48x48/apps/drracket.png %{_iconsdir}/hicolor/64x64/apps/drracket.png %{_datadir}/applications/drracket.desktop