%define dsss_version 0.75 %define rebuild_version %{dsss_version} %if %{?_with_dmd:1}%{!?_with_dmd:0} %define with_dmd 1 %define with_gdc 0 %else %define with_dmd 0 %define with_gdc 1 %endif Summary: D Shared Software System Name: dsss Version: %{dsss_version} Release: 0%{?dist} Group: Development/Tools License: MIT URL: http://dsource.org/projects/dsss/ Source: http://svn.dsource.org/projects/dsss/downloads/%{version}/%{name}-%{version}.tar.bz2 Source1: http://gdcgnu.sourceforge.net/rebuild_choosedc.1 Patch1: rebuild.1.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root %if %{with_dmd} BuildRequires: dmd %endif %if %{with_gdc} BuildRequires: gdc %endif Requires: rebuild = %{rebuild_version}, curl %description DSSS, the D Shared Software System, is a tool to ease the building, installation, configuration and acquisition of D software. %package -n rebuild Version: %{rebuild_version} Summary: Build tool for D Group: Development/Tools License: Artistic or GPL %description -n rebuild Rebuild is a tool for building D software. It is based on the frontend to the DMD D compiler. Essentially, for any D source file given, rebuild finds all dependencies, and compiles them all into the target. %prep %setup cp %{SOURCE1} rebuild pushd rebuild patch rebuild.1 %{PATCH1} popd %if %{with_dmd} ln -s Makefile.dmd.posix Makefile %endif %if %{with_gdc} ln -s Makefile.gdc.posix Makefile %endif %build make CXXFLAGS="$RPM_OPT_FLAGS" %install rm -rf $RPM_BUILD_ROOT make install PREFIX="$RPM_BUILD_ROOT%{_prefix}" install -d $RPM_BUILD_ROOT%{_datadir}/dsss/sources install -d $RPM_BUILD_ROOT%{_mandir}/man1 install -p docs/dsss.1 $RPM_BUILD_ROOT%{_mandir}/man1 install -p rebuild/rebuild_choosedc.1 $RPM_BUILD_ROOT%{_mandir}/man1 install -p rebuild/rebuild.1 $RPM_BUILD_ROOT%{_mandir}/man1 ln -s rebuild.1 $RPM_BUILD_ROOT%{_mandir}/man1/rerun.1 mv $RPM_BUILD_ROOT%{_prefix}/etc $RPM_BUILD_ROOT%{_sysconfdir} || : # documentation installed with %%doc rm -rf $RPM_BUILD_ROOT%{_datadir}/doc %clean rm -rf $RPM_BUILD_ROOT %files %doc docs/README* %doc docs/LICENSE %defattr(-,root,root) %{_bindir}/dsss %{_mandir}/man1/dsss.1* %dir %{_datadir}/dsss/manifest %{_datadir}/dsss/manifest/*.manifest %dir %{_datadir}/dsss/sources %{_datadir}/dsss/sources/EMPTY %{_datadir}/dsss/dsss_lib_test.d %{_datadir}/dsss/candydoc.tar.gz %dir %{_sysconfdir}/dsss %config %{_sysconfdir}/dsss/* #files devel %{_includedir}/d/* %files -n rebuild %doc rebuild/README %doc rebuild/artistic.txt rebuild/gpl.txt %{_bindir}/rebuild_choosedc %{_bindir}/rebuild %{_bindir}/rerun %{_mandir}/man1/rebuild_choosedc.1* %{_mandir}/man1/rebuild.1* %{_mandir}/man1/rerun.1* %dir %{_sysconfdir}/rebuild %config %{_sysconfdir}/rebuild/* %{_datadir}/rebuild