%define dsss_version 0.57 %define rebuild_version 0.15 %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 Patch: dsss-0.57-etcprefix.patch Source1: http://gdcgnu.sourceforge.net/dsss.1 Source2: http://gdcgnu.sourceforge.net/rebuild.1 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 %patch -p1 cp %{SOURCE1} . cp %{SOURCE2} rebuild %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 dsss.1 $RPM_BUILD_ROOT%{_mandir}/man1 install -p rebuild/rebuild.1 $RPM_BUILD_ROOT%{_mandir}/man1 mv $RPM_BUILD_ROOT%{_prefix}/etc $RPM_BUILD_ROOT%{_sysconfdir} || : %clean rm -rf $RPM_BUILD_ROOT %files %doc docs/* %defattr(-,root,root) %{_bindir}/dsss %{_mandir}/man1/dsss.1* %dir %{_datadir}/dsss/manifest %{_datadir}/dsss/manifest/*.manifest %dir %{_datadir}/dsss/sources %dir %{_sysconfdir}/dsss %config %{_sysconfdir}/dsss/* #files devel %{_includedir}/d/* %{_libdir}/*.a %files -n rebuild %doc rebuild/README %doc rebuild/artistic.txt rebuild/gpl.txt %{_bindir}/rebuild %{_mandir}/man1/rebuild.1* %dir %{_sysconfdir}/rebuild %config %{_sysconfdir}/rebuild/* %{_libdir}/dymoduleinit.d