From Fedora Project Wiki

(Include directories)
Line 41: Line 41:
==== Include directories ====
==== Include directories ====
%{_d_includedir} need be used for devel file<BR>
'''%{_d_includedir}''' need be used for devel file<BR>
%{_d_includedir} define /usr/include/d/ directory
'''%{_d_includedir}''' define ''/usr/include/d/'' directory
==== Compiler options ====
==== Compiler options ====

Revision as of 13:43, 28 July 2010

Revision: 0.1
Last Revised: Wednesday Jul 28, 2010

Packaging Tips

File Locations


D packages must install assemblies to %{_libdir} rather than /usr/lib or %{_datadir}.


D package must install header file like .d or .di to %{_d_includedir}/%{name}


At this time in D programming only OS X support shared lirbraries. So wait this feature or help ldc project. Feel free.
For build static librarie in D you need use ar and ranlib tools. ldc compiler support GNU strip.
short example from makefile:

DFLAGS_REQ=-c -I ../DerelictUtil
    derelict/openal/al.d \
    derelict/openal/alfuncs.d \

all : DerelictAL

$(LIB_PRE)DerelictAL.$(LIB_EXT) :
	$(AR) rcs $@ $^
	$(RANLIB) $@
	$(CP) $@ $(LIB_DEST)
	$(RM) $@


All D package need ldc for build and macro file is in ldc package, every package must have ldc in BuildRequire

Include directories

%{_d_includedir} need be used for devel file
%{_d_includedir} define /usr/include/d/ directory

Compiler options

%{_d_optflags} need be used for ldc options
%{_d_optflags} define options -release -w -g
-release disables asserts, invariants, contracts and boundscheck
-w enable warnings
-g generate debug information