milis/talimatname/genel/dmd/talimat

82 lines
2.4 KiB
Plaintext
Raw Normal View History

2017-03-22 12:44:33 +01:00
# Description: D programlama dili başvuru derleyici
2016-02-24 01:27:23 +01:00
# URL: http://www.dlang.org
2017-01-31 01:37:09 +01:00
# Packager: milisarge
2016-02-24 01:27:23 +01:00
# Depends on: unzip
2017-01-31 01:37:09 +01:00
2016-02-24 01:27:23 +01:00
name=dmd
version=2.068.1
release=1
source=(http://downloads.dlang.org/releases/2015/dmd.$version.zip
dmd.desktop dmd.logo_48.png)
build(){
[ "`uname -m`" == "i686" ] && archstr=32
[ "`uname -m`" == "x86_64" ] && archstr=64
# dmd
cd $SRC/dmd2/src/dmd
make AUTO_BOOTSTRAP=1 -f posix.mak MODEL=$archstr
PATH=.:$PATH
make -f posix.mak MODEL=$archstr
install -Dm755 dmd $PKG/usr/bin/dmd
# druntime
cd $SRC/dmd2/src/druntime
make -f posix.mak MODEL=$archstr DMD=../dmd/dmd
mkdir -p $PKG/usr/include/d
cp -r import/* $PKG/usr/include/d
# libphobos
cd $SRC/dmd2/src/phobos
make -f posix.mak MODEL=$archstr DMD=../dmd/dmd
install -Dm644 generated/linux/release/$archstr/libphobos2.a \
2017-01-31 01:37:09 +01:00
$PKG/usr/lib/libphobos2.a
2016-02-24 01:27:23 +01:00
# Elf file dumper
install -Dm755 $SRC/dmd2/linux/bin$archstr/dumpobj \
$PKG/usr/bin/dumpobj
# Elf file disassembler
install -Dm755 $SRC/dmd2/linux/bin$archstr/obj2asm \
$PKG/usr/bin/obj2asm
# Run D program as a script
install -Dm755 $SRC/dmd2/linux/bin$archstr/rdmd \
$PKG/usr/bin/rdmd
install -Dm755 $SRC/dmd2/linux/bin$archstr/dman \
$PKG/usr/bin/dman
install -Dm755 $SRC/dmd2/linux/bin$archstr/ddemangle \
$PKG/usr/bin/ddemangle
# D compiler configuration file
mkdir -p $PKG/etc
echo -e "[Environment]\nDFLAGS=-I/usr/include/d -L-L/usr/lib -L--no-warn-search-mismatch -L--export-dynamic" \ > $PKG/etc/dmd.conf
2017-01-31 01:37:09 +01:00
# D samples
2016-02-24 01:27:23 +01:00
mkdir -p $PKG/usr/share/d/samples/
cp -r $SRC/dmd2/samples/d/* $PKG/usr/share/d/samples/
# standard d modules
cd $SRC/dmd2/src/phobos
mkdir -p $PKG/usr/include/d
cp -Rf std $PKG/usr/include/d
cp -Rf etc $PKG/usr/include/d
cp -f {index,unittest}.d $PKG/usr/include/d
# man pages
cd $SRC/dmd2
mkdir -p $PKG/usr/share/man/{man1,man5}
cp -Rf man/man1/*.1 $PKG/usr/share/man/man1/
cp -Rf man/man5/*.5 $PKG/usr/share/man/man5/
# doc
mkdir -p $PKG/usr/share/doc/$pkgname-$pkgver/
cp -Rf html/d/* $PKG/usr/share/doc/$pkgname-$pkgver/
2017-01-31 01:37:09 +01:00
2016-02-24 01:27:23 +01:00
# desktop integration
install -Dm644 $SRC/$name.desktop \
$PKG/usr/share/applications/$name.desktop
install -Dm 644 $SRC/$name.logo_48.png \
$PKG/usr/share/icons/hicolor/48x48/apps/dlogo_48.png
}