]> git.pld-linux.org Git - packages/dmd.git/blame - dmd.spec
- new; unfortunately not distributable
[packages/dmd.git] / dmd.spec
CommitLineData
39aab3ac
JB
1Summary: Digital Mars D compiler
2Summary(pl.UTF-8): Digital Mars D - kompilator języka D
3Name: dmd
4Version: 2.062
5Release: 1
6# Digital Mars is proprietary license (not redistributable)
7License: Boost (D runtime, Phobos), GPL v1+ or Artistic (compiler frontend), Digital Mars (the rest)
8Group: Development/Languages
9Source0: http://downloads.dlang.org.s3-website-us-east-1.amazonaws.com/releases/2013/%{name}.%{version}.zip
10# NoSource0-md5: fd2211206532ab41a8aef764a9225d3c
11NoSource: 0
12URL: http://dlang.org/dmd-linux.html
13BuildRequires: libstdc++-devel
14ExclusiveArch: %{ix86} %{x8664}
15BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17%ifarch %{ix86}
18%define model 32
19%else
20%define model 64
21%endif
22
23%description
24Digital Mars D compiler.
25
26%description -l pl.UTF-8
27Digital Mars D - kompilator języka D.
28
29%prep
30%setup -q -n dmd2
31
32echo "%{version}" > src/VERSION
33
34cp -p src/dmd/backendlicense.txt dmd-backendlicense.txt
35cp -p src/dmd/readme.txt dmd-readme.txt
36cp -p src/druntime/LICENSE druntime-LICENSE
37cp -p src/druntime/README druntime-README
38
39%build
40%{__make} -C src/dmd -f posix.mak \
41 OS=LINUX \
42 TARGET_CPU=X86 \
43 MODEL=%{model} \
44 HOST_CC="%{__cxx}" \
45 GFLAGS='%{rpmcxxflags} $(WARNINGS) -D__pascal= -fno-exceptions'
46
47DMD=$(pwd)/src/dmd/dmd
48%{__make} -C src/druntime -f posix.mak \
49 OS=linux \
50 MODEL=%{model} \
51 CC="%{__cc}" \
52 CFLAGS="%{rpmcflags} -m%{model} -fPIC" \
53 DMD="$DMD" \
54 PIC="-fPIC"
55
56%{__make} -C src/phobos -f posix.mak \
57 OS=linux \
58 MODEL=%{model} \
59 CC="%{__cc}" \
60 CFLAGS="%{rpmcflags} -m%{model} -fPIC" \
61 DMD="$DMD" \
62 PIC="-fPIC"
63
64%install
65rm -rf $RPM_BUILD_ROOT
66install -d $RPM_BUILD_ROOT{%{_includedir}/d/dmd/phobos,%{_libdir},%{_sysconfdir},%{_docdir}/dmd}
67
68install -Dp src/dmd/dmd $RPM_BUILD_ROOT%{_bindir}/dmd
69cp -p src/druntime/lib/libdruntime-linux%{model}.a $RPM_BUILD_ROOT%{_libdir}
70cp -p src/phobos/generated/linux/release/%{model}/libphobos2.a $RPM_BUILD_ROOT%{_libdir}
71cp -pr src/druntime/import $RPM_BUILD_ROOT%{_includedir}/d/dmd/druntime
72cp -pr src/phobos/{std,*.d} $RPM_BUILD_ROOT%{_includedir}/d/dmd/phobos
73cp -pr src/druntime/doc $RPM_BUILD_ROOT%{_docdir}/dmd/druntime
74install -Dp man/man1/dmd.1 $RPM_BUILD_ROOT%{_mandir}/man1/dmd.1
75install -Dp man/man1/dmd.conf.5 $RPM_BUILD_ROOT%{_mandir}/man5/dmd.conf.5
76
77cat >$RPM_BUILD_ROOT%{_sysconfdir}/dmd.conf <<EOF
78[Environment]
79DFLAGS=-I/usr/include/d/dmd/phobos -I/usr/include/d/dmd/druntime -L-L%{_libdir} -L--no-warn-search-mismatch -L--export-dynamic
80EOF
81
82%clean
83rm -rf $RPM_BUILD_ROOT
84
85%files
86%defattr(644,root,root,755)
87%doc README.TXT license.txt dmd-*.txt druntime-*
88%attr(755,root,root) %{_bindir}/dmd
89%{_libdir}/libdruntime-linux%{model}.a
90%{_libdir}/libphobos2.a
91%{_sysconfdir}/dmd.conf
92%dir %{_includedir}/d
93%{_includedir}/d/dmd
94%{_mandir}/man1/dmd.1*
95%{_mandir}/man5/dmd.conf.5*
96%{_docdir}/dmd
This page took 0.148196 seconds and 4 git commands to generate.