build-extensions 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. #!/bin/bash
  2. # Build Freon Linux software from source.
  3. # Version: 0.6.0
  4. # (C) Chris Dorman, 2018-2020 GPLv3+
  5. corecount="25"
  6. #### Variables ###
  7. mainmirror="http://mirror.freonlinux.com/source/packages"
  8. # mirrors
  9. mpfrmirror="https://ftp.gnu.org/gnu/mpfr"
  10. mpcmirror="https://ftp.gnu.org/gnu/mpc"
  11. gmpmirror="https://ftp.gnu.org/gnu/gmp"
  12. binutilsmirror="https://ftp.gnu.org/gnu/binutils"
  13. gccmirror="http://ftp.gnu.org/gnu/gcc/gcc-9.2.0"
  14. nanomirror="https://www.nano-editor.org/dist/v3"
  15. chttpdmirror="https://github.com/Pentium44/chttpd.git"
  16. ftpmirror="https://github.com/Harlonxl/minFTPD.git"
  17. harfbuzzmirror="http://deb.debian.org/debian/pool/main/h/harfbuzz"
  18. ncursesmirror="https://ftp.gnu.org/pub/gnu/ncurses"
  19. bashmirror="https://ftp.gnu.org/gnu/bash"
  20. zlibmirror="https://zlib.net"
  21. termcapmirror="https://ftp.gnu.org/gnu/termcap"
  22. htopmirror="https://github.com/htop-dev/htop/archive"
  23. islmirror="http://isl.gforge.inria.fr"
  24. irciimirror="http://ircii.warped.com"
  25. opensslmirror="https://www.openssl.org/source"
  26. xlibmirror="https://www.x.org/archive/individual/lib"
  27. xcbmirror="https://www.x.org/archive/individual/xcb"
  28. libbsdmirror="https://libbsd.freedesktop.org/releases"
  29. bz2mirror="https://sourceware.org/pub/bzip2"
  30. freetypemirror="https://download.savannah.gnu.org/releases/freetype"
  31. png16mirror="https://download.sourceforge.net/libpng"
  32. stracemirror="https://gitlab.com/strace/strace.git"
  33. elfutilsmirror="git://sourceware.org/git/elfutils.git"
  34. gtk2mirror="https://download.gnome.org/sources/gtk+/2.24"
  35. netsurfmirror="http://download.netsurf-browser.org/netsurf/releases/source-full"
  36. xfemirror="https://netactuate.dl.sourceforge.net/project/xfe/xfe/1.43.2"
  37. pangomirror="https://download.gnome.org/sources/pango/1.42"
  38. fontconfigmirror="https://www.freedesktop.org/software/fontconfig/release"
  39. hexchatmirror="https://dl.hexchat.net/hexchat"
  40. pcmanfmmirror="https://downloads.sourceforge.net/pcmanfm"
  41. idnmirror="https://ftp.gnu.org/gnu/libidn"
  42. lynxmirror="https://invisible-mirror.net/archives/lynx/tarballs"
  43. expatmirror="https://github.com/libexpat/libexpat/releases/download/R_2_2_7"
  44. utillinuxmirror="https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.33"
  45. foxmirror="ftp://ftp.fox-toolkit.org/pub"
  46. glib2mirror="https://download.gnome.org/sources/glib/2.56"
  47. cairomirror="https://www.cairographics.org/releases"
  48. gdkpixbufmirror="http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.36"
  49. atkmirror="http://ftp.gnome.org/pub/gnome/sources/atk/2.26"
  50. gobjectintromirror="http://ftp.gnome.org/pub/gnome/sources/gobject-introspection/1.54"
  51. selinuxmirror="http://deb.debian.org/debian/pool/main/libs/libselinux"
  52. ffimirror="https://sourceware.org/ftp/libffi"
  53. pcremirror="https://downloads.sourceforge.net/pcre"
  54. fmmirror="https://downloads.sourceforge.net/pcmanfm"
  55. menucachemirror="https://downloads.sourceforge.net/lxde"
  56. notifymirror="http://ftp.gnome.org/pub/gnome/sources/libnotify/0.7"
  57. fribidimirror="https://github.com/fribidi/fribidi/releases/download/v1.0.1"
  58. saircdmirror="https://github.com/rg3/saircd"
  59. sqlitemirror="https://www.sqlite.org/2020"
  60. # filenames
  61. gcc="gcc-9.2.0.tar.xz"
  62. nano="nano-3.1.tar.xz"
  63. ncurses="ncurses-6.1.tar.gz"
  64. bash="bash-5.0.tar.gz"
  65. zlib="zlib-1.2.11.tar.xz"
  66. termcap="termcap-1.3.1.tar.gz"
  67. htop="htop-2.2.0.tar.gz"
  68. binutils="binutils-2.31.1.tar.xz"
  69. gmp="gmp-6.1.2.tar.xz"
  70. mpfr="mpfr-4.0.2.tar.xz"
  71. mpc="mpc-1.1.0.tar.gz"
  72. isl="isl-0.19.tar.xz"
  73. ircii="ircii-20190117.tar.gz"
  74. openssl="openssl-1.1.1h.tar.gz"
  75. libbsd="libbsd-0.9.1.tar.xz"
  76. bz2="bzip2-1.0.8.tar.gz"
  77. freetype="freetype-2.10.4.tar.xz"
  78. png16="libpng-1.6.37.tar.xz"
  79. gtk2="gtk+-2.24.32.tar.xz"
  80. netsurf="netsurf-all-3.10.tar.gz"
  81. xcb="libxcb-1.13.tar.gz"
  82. xcbutil="xcb-util-0.4.0.tar.gz"
  83. xcbproto="xcb-proto-1.13.tar.gz"
  84. xfe="xfe-1.43.2.tar.gz"
  85. pango="pango-1.42.4.tar.xz"
  86. fontconfig="fontconfig-2.13.1.tar.bz2"
  87. hexchat="hexchat-2.12.4.tar.xz"
  88. pcmanfm="pcmanfm-1.3.1.tar.xz"
  89. lynx="lynx2.8.9rel.1.tar.gz"
  90. idn="libidn-1.36.tar.gz"
  91. expat="expat-2.2.7.tar.xz"
  92. utillinux="util-linux-2.33.2.tar.xz"
  93. fox="fox-1.6.57.tar.gz"
  94. glib2="glib-2.56.4.tar.xz"
  95. gobjectintro="gobject-introspection-1.54.1.tar.xz"
  96. gdkpixbuf="gdk-pixbuf-2.36.11.tar.xz"
  97. cairo="cairo-1.14.12.tar.xz"
  98. pixman="pixman-0.34.0.tar.gz"
  99. atk="atk-2.26.1.tar.xz"
  100. pcre="pcre-8.43.tar.bz2"
  101. selinux="libselinux_2.8.orig.tar.gz"
  102. fm="libfm-1.2.5.tar.xz"
  103. ffi="libffi-3.2.1.tar.gz"
  104. menucache="menu-cache-1.1.0.tar.xz"
  105. notify="libnotify-0.7.6.tar.xz"
  106. fribidi="fribidi-1.0.1.tar.bz2"
  107. harfbuzz="harfbuzz_2.3.1.orig.tar.bz2"
  108. sqlite="sqlite-autoconf-3340000.tar.gz"
  109. netcat="netcat-0.7.1.tar.bz2"
  110. socat="socat-1.7.4.1.tar.gz"
  111. nmap="nmap-7.91.tar.bz2"
  112. overkill="0verkill-0.16.tar.gz"
  113. readline="readline-8.1.tar.gz"
  114. # work directories
  115. tmpdir="`pwd`/pkgsrc"
  116. softwaredir="`pwd`/src/rootfs"
  117. freondir="/freon"
  118. systemdir="`pwd`/system"
  119. pkgbuilddir="`pwd`/pkgbuild"
  120. # source directories
  121. gccsrcdir=${gcc//.tar.xz}
  122. nanosrcdir=${nano//.tar.xz}
  123. ncursessrcdir=${ncurses//.tar.gz}
  124. bashsrcdir=${bash//.tar.gz}
  125. zlibsrcdir=${zlib//.tar.xz}
  126. termcapsrcdir=${termcap//.tar.gz}
  127. htopsrcdir=${htop//.tar.gz}
  128. mpcsrcdir=${mpc//.tar.gz}
  129. mpfrsrcdir=${mpfr//.tar.xz}
  130. binutilssrcdir=${binutils//.tar.xz}
  131. gmpsrcdir=${gmp//.tar.xz}
  132. islsrcdir=${isl//.tar.xz}
  133. irciisrcdir=${ircii//.tar.gz}
  134. opensslsrcdir=${openssl//.tar.gz}
  135. libbsdsrcdir=${libbsd//.tar.xz}
  136. bz2srcdir=${bz2//.tar.gz}
  137. freetypesrcdir=${freetype//.tar.xz}
  138. png16srcdir=${png16//.tar.xz}
  139. fontmiscsrcdir=${fontmisc//.tar.bz2}
  140. font75dpisrcdir=${font75dpi//.tar.bz2}
  141. font100dpisrcdir=${font100dpi//.tar.bz2}
  142. gtk2srcdir=${gtk2//.tar.xz}
  143. netsurfsrcdir=${netsurf//.tar.gz}
  144. xfesrcdir=${xfe//.tar.gz}
  145. pangosrcdir=${pango//.tar.xz}
  146. fontconfigsrcdir=${fontconfig//.tar.bz2}
  147. hexchatsrcdir=${hexchat//.tar.xz}
  148. pcmanfmsrcdir=${pcmanfm//.tar.xz}
  149. lynxsrcdir=${lynx//.tar.gz}
  150. idnsrcdir=${idn//.tar.gz}
  151. xcbsrcdir=${xcb//.tar.gz}
  152. xcbutilsrcdir=${xcbutil//.tar.gz}
  153. xcbprotosrcdir=${xcbproto//.tar.gz}
  154. expatsrcdir=${expat//.tar.xz}
  155. utillinuxsrcdir=${utillinux//.tar.xz}
  156. foxsrcdir=${fox//.tar.gz}
  157. glib2srcdir=${glib2//.tar.xz}
  158. gdkpixbufsrcdir=${gdkpixbuf//.tar.xz}
  159. cairosrcdir=${cairo//.tar.xz}
  160. pixmansrcdir=${pixman//.tar.gz}
  161. atksrcdir=${atk//.tar.xz}
  162. gobjectintrosrcdir=${gobjectintro//.tar.xz}
  163. ffisrcdir=${ffi//.tar.gz}
  164. pcresrcdir=${pcre//.tar.bz2}
  165. selinuxsrcdir=${selinux//.orig.tar.gz}
  166. fmsrcdir=${fm//.tar.xz}
  167. menucachesrcdir=${menucache//.tar.xz}
  168. notifysrcdir=${notify//.tar.xz}
  169. fribidisrcdir=${fribidi//.tar.bz2}
  170. harfbuzzsrcdir=${harfbuzz//.tar.bz2}
  171. sqlitesrcdir=${sqlite//.tar.gz}
  172. netcatsrcdir=${netcat//.tar.bz2}
  173. socatsrcdir=${socat//.tar.gz}
  174. nmapsrcdir=${nmap//.tar.bz2}
  175. overkillsrcdir=${overkill//.tar.gz}
  176. readlinesrcdir=${readline//.tar.gz}
  177. if [ ! -d "$tmpdir" ]; then
  178. echo "Warning: package source directory not found, creating."
  179. mkdir $tmpdir > /dev/null 2>&1
  180. fi
  181. case $1 in
  182. * ) echo "Building $1..."
  183. . $pkgbuilddir/$1.build;;
  184. esac