talimat 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Description: D programlama dili başvuru derleyici
  2. # URL: http://www.dlang.org
  3. # Packager: milisarge
  4. # Depends on: unzip
  5. name=dmd
  6. version=2.074.0
  7. release=1
  8. source=(http://downloads.dlang.org/releases/2017/dmd.$version.linux.tar.xz
  9. dmd.conf
  10. dmd.desktop
  11. dmd.logo_48.png
  12. default_ddoc_theme.ddoc)
  13. build(){
  14. if [ ! -f $DERLEME_KAYNAKDIZIN/phobos-$version.tar.gz ];then
  15. wget https://github.com/dlang/phobos/archive/v$version.tar.gz -O $DERLEME_KAYNAKDIZIN/phobos-$version.tar.gz
  16. else
  17. bsdtar -xf $DERLEME_KAYNAKDIZIN/phobos-$version.tar.gz -C $SRC/
  18. fi
  19. if [ ! -f $DERLEME_KAYNAKDIZIN/druntime-$version.tar.gz ];then
  20. wget https://github.com/dlang/druntime/archive/v$version.tar.gz -O $DERLEME_KAYNAKDIZIN/druntime-$version.tar.gz
  21. else
  22. bsdtar -xf $DERLEME_KAYNAKDIZIN/druntime-$version.tar.gz -C $SRC/
  23. fi
  24. cd dmd2/src/dmd
  25. mkdir -p res
  26. cp $SRC/default_ddoc_theme.ddoc res/
  27. echo $version > ../VERSION
  28. make -j1 -f posix.mak MODEL=64 RELEASE=1 AUTO_BOOTSTRAP=1
  29. cd $SRC/druntime-$version
  30. make -j1 -f posix.mak MODEL=64 DMD=$SRC/dmd2/src/dmd RELEASE=1
  31. cd $SRC/phobos-$version
  32. make -j1 -f posix.mak MODEL=64 DMD=$SRC/dmd2/src/dmd RELEASE=1
  33. install -m 0755 -D $SRC/dmd2/src/dmd $PKG/usr/bin/dmd
  34. install -d $PKG/etc
  35. echo -e "[Environment]\nDFLAGS=-I/usr/include/dlang/dmd -L-L/usr/lib -L-L/usr/lib32 -L--export-dynamic" > $PKG/etc/dmd.conf
  36. install -d %PKG/usr/share/man/man{1,5}
  37. cp -r $SRC/dmd2/docs/man/man1/* $pkgdir/usr/share/man/man1/
  38. cp -r $SRC/dmd2/docs/man/man5/* $pkgdir/usr/share/man/man5/
  39. install -d $PKG/usr/share/d/samples/
  40. cp -r $SRC/dmd2/samples/* $PKG/usr/share/d/samples/
  41. # Phobos standard library
  42. install -m 0644 -D $SRC/phobos-$version/generated/linux/release/64/libphobos2.a \
  43. $PKG/usr/lib/libphobos2.a
  44. install -d $PKG/usr/include/dlang/dmd
  45. cp -r $SRC/phobos-$version/{*.d,etc,std} $PKG/usr/include/dlang/dmd
  46. cp -r $SRC/druntime-$version/import/* $PKG/usr/include/dlang/dmd/
  47. install -m 0644 -D $SRC/phobos-$version/generated/linux/release/64/libphobos2.so \
  48. $PKG/usr/lib/libphobos2.so
  49. }