dot

packages and services management
Log | Files | Refs | README

commit e6ee38c8fab80a3441a77c0d965156c2a0d6c595
parent 5313abf873602396f0922f0dd2af62b0f4d2e4e8
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sat,  1 Sep 2018 13:51:14 +0200

pack: add Xorg library and server

Diffstat:
Mbin/pack-add | 14++++----------
Mbin/pack-del | 7++++---
Abin/pack-dep | 17+++++++++++++++++
Abin/pack-install | 11+++++++++++
Mbin/pack-tar | 6+++---
Mpack/dwm-git/config.mk | 28++++++++++++++--------------
Mpack/dwm-git/dep | 4++++
Apack/gperf | 2++
Rpack/libx11-1.5.0/build -> pack/gperf-3.1/build | 0
Cpack/dwm-git/dep -> pack/gperf-3.1/dep | 0
Apack/gperf-3.1/tar | 1+
Apack/libXft | 2++
Apack/libXft-2.3.2/build | 11+++++++++++
Apack/libXft-2.3.2/dep | 2++
Apack/libXft-2.3.2/tar | 1+
Apack/libexpat | 2++
Rpack/libx11-1.5.0/build -> pack/libexpat-2.2.6/build | 0
Apack/libexpat-2.2.6/tar | 1+
Apack/libfontconfig | 2++
Apack/libfontconfig-2.13.1/build | 14++++++++++++++
Apack/libfontconfig-2.13.1/dep | 5+++++
Apack/libfontconfig-2.13.1/tar | 1+
Apack/libfreetype | 2++
Apack/libfreetype-2.4.9/build | 6++++++
Rpack/libx11-1.5.0/dep -> pack/libfreetype-2.4.9/dep | 0
Apack/libfreetype-2.4.9/tar | 1+
Apack/libtinyX11 | 2++
Apack/libtinyX11-git/build | 7+++++++
Apack/libtinyX11-git/git | 1+
Apack/libtinyX11-git/standard_definitions.mk | 14++++++++++++++
Apack/libuuid | 2++
Rpack/libx11-1.5.0/build -> pack/libuuid-1.0.3/build | 0
Apack/libuuid-1.0.3/tar | 1+
Dpack/libx11 | 2--
Dpack/libx11-1.5.0/tar | 1-
Mpack/libz-1.2.11/tar | 2+-
Mpack/s6-portable-utils-2.2.1.1/build | 6+++---
Mpack/s6-portable-utils-2.2.1.1/dep | 1+
Mpack/sacc | 4++--
Apack/sacc-git/build | 4++++
Apack/sacc-git/config.mk | 11+++++++++++
Apack/sacc-git/dep | 2++
Apack/sacc-git/git | 1+
Apack/tinyxorg | 2++
Apack/tinyxorg-git/build | 6++++++
Apack/tinyxorg-git/dep | 2++
Apack/tinyxorg-git/git | 1+
Apack/tinyxorg-git/standard_definitions.mk | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
48 files changed, 279 insertions(+), 39 deletions(-)

diff --git a/bin/pack-add b/bin/pack-add @@ -1,12 +1,6 @@ #!/bin/sh -e -# build a program into /opt/<package>/<version> and symlink it into /local -test -h "/etc/pack/$1" && set -- "$(readlink "/etc/pack/$1")" -test -f "/etc/pack/$1/dep" && xargs -n 1 pack-add </etc/pack/$1/dep -test -d "/opt/$1" || pack-build "$1" || { rm -rf "/opt/$1"; exit 1; } -printf '\033[1m[ installing %s ]\033[m\n' "$1" -cd "/opt/$1" -ln -sf "$1" "${1%-*}" -mv -f "${1%-*}" .. -find -L * -type d -exec sh -c 'mkdir -p "/local/$0"' {} \; -find -L * -type f -exec sh -c 'ln -sf "/opt/$1/$0" "/local/$0"' {} "${1%-*}" \; +test -h "/etc/pack/$1" || : && set -- "$(readlink "/etc/pack/$1")" +test -d "/etc/pack/$1" +printf '\033[1m[ dependencies for %s ]\033[m\n' "$1" +pack-dep "$1" | xargs -n 1 pack-install diff --git a/bin/pack-del b/bin/pack-del @@ -2,6 +2,7 @@ # remove all files installed by a package from /local printf '\033[1m[ deleting %s ]\033[m\n' "$1" -cd /opt/$1 -find * -type f -o -type l -exec sh -c 'rm -f "/local/$0"' {} \; -rm -rf /opt/$1 +cd "/opt/$1" +find . -type f -o -type l -exec sh -c 'rm -f "/local/$0"' {} \; +test -h "/opt/$1" && rm -rf "/opt/$1/$(readlink "$1")" +rm -rf "/opt/$1" diff --git a/bin/pack-dep b/bin/pack-dep @@ -0,0 +1,17 @@ +#!/bin/sh -e +# Resolve dependencies of a package using tsort + +check() ( + echo "$1" "$1" + test -f "/etc/pack/$1/dep" || exit 0 + while read dep + do + test ! -h "/etc/pack/$dep" || dep="$(readlink "/etc/pack/$dep")" + echo "$dep" "$1" + check "$dep" + done </etc/pack/$1/dep +) + +test ! -h "/etc/pack/$1" || set -- "$(readlink "/etc/pack/$1")" +test -d "/etc/pack/$1" +check "$1" | tsort diff --git a/bin/pack-install b/bin/pack-install @@ -0,0 +1,11 @@ +#!/bin/sh -e +# build a program into /opt/<package>/<version> and symlink it into /local + +test -h "/etc/pack/$1" && set -- "$(readlink "/etc/pack/$1")" +test -d "/opt/$1" || pack-build "$1" || { rm -rf "/opt/$1"; exit 1; } +printf '\033[1m[ installing %s ]\033[m\n' "$1" +cd "/opt/$1" +ln -sf "$1" "${1%-*}" +mv -f "${1%-*}" .. +find * -type d -exec sh -c 'mkdir -p "/local/$0"' {} \; +find * -type f -exec sh -c 'ln -sf "/opt/$1/$0" "/local/$0"' {} "${1%-*}" \; diff --git a/bin/pack-tar b/bin/pack-tar @@ -5,15 +5,15 @@ test -h "/etc/pack/$1" && set -- "$(readlink "/etc/pack/$1")" test ! -d "/src/$1" || exec echo "$1" already downloaded IFS='' read -r url </etc/pack/$1/tar -mkdir -p "$(dirname "/tar/$1")" +mkdir -p /src wget -O - "$url" | case $url in (*.tgz|*.tar.gz) gzip -d - ;; (*.tbz|*.tar.bz2) bzip2 -d - ;; (*.txz|*.tar.xz) xz -d - ;; (*.tlz|*.tar.lz) lzip -d - ;; -esac >/tar/$1.tar || { rm -f "/tar/$1.tar"; exit 1; } +esac >/src/$1.tar || { rm -f "/src/$1.tar"; exit 1; } mkdir -p "/src/$1" -tar -xf "/tar/$1.tar" -C "/src/$1" || { rm -rf "/src/$1"; exit 1; } +tar -xf "/src/$1.tar" -C "/src/$1" || { rm -rf "/src/$1"; exit 1; } mv "/src/$1"/*/* "/src/$1" ! rmdir "/src/$1"/* 2>/dev/null diff --git a/pack/dwm-git/config.mk b/pack/dwm-git/config.mk @@ -7,21 +7,21 @@ VERSION = 6.1 PREFIX = /usr/local MANPREFIX = ${PREFIX}/share/man -X11INC = /usr/X11R6/include -X11LIB = /usr/X11R6/lib - # Xinerama, comment if you don't want it -XINERAMALIBS = -lXinerama -XINERAMAFLAGS = -DXINERAMA - -# freetype -FREETYPELIBS = -lfontconfig -lXft -# OpenBSD (uncomment) -FREETYPEINC = ${X11INC}/freetype2 - -# includes and libs -INCS = -I${X11INC} -I${FREETYPEINC} -LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} +#XINERAMALIBS = -lXinerama +#XINERAMAFLAGS = -DXINERAMA + +INCS = \ + -I/opt/libtinyX11/include \ + -I/opt/libXft/include \ + -I/opt/libfreetype/include \ + -I/opt/libfontconfig/include +LIBS = \ + -L/opt/libtinyX11/lib -lX11 \ + -L/opt/libXft/lib -lXft \ + -L/opt/libfreetype/lib -lfreetype \ + -L/opt/libfontconfig/lib -lfontconfig \ + #-static # flags CPPFLAGS = -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} diff --git a/pack/dwm-git/dep b/pack/dwm-git/dep @@ -1 +1,5 @@ gmake +libtinyX11 +libXft +libfontconfig +libfreetype diff --git a/pack/gperf b/pack/gperf @@ -0,0 +1 @@ +gperf-3.1+ \ No newline at end of file diff --git a/pack/libx11-1.5.0/build b/pack/gperf-3.1/build diff --git a/pack/dwm-git/dep b/pack/gperf-3.1/dep diff --git a/pack/gperf-3.1/tar b/pack/gperf-3.1/tar @@ -0,0 +1 @@ +http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz diff --git a/pack/libXft b/pack/libXft @@ -0,0 +1 @@ +libXft-2.3.2+ \ No newline at end of file diff --git a/pack/libXft-2.3.2/build b/pack/libXft-2.3.2/build @@ -0,0 +1,11 @@ +#!/bin/sh -ex + +export XRENDER_CFLAGS='-I/opt/libtinyX11/include' +export XRENDER_LIBS='-L/opt/libtinyX11/lib -lXrender' +export FREETYPE_CFLAGS='-I/opt/libfreetype/include' +export FREETYPE_LIBS='-L/opt/libfreetype/lib -lfreetype' +export FONTCONFIG_CFLAGS='-I/opt/libfontconfig/include' +export FONTCONFIG_LIBS='-L/opt/libfontconfig/lib -lfreetype' + +./configure --prefix="$PREFIX" +make install diff --git a/pack/libXft-2.3.2/dep b/pack/libXft-2.3.2/dep @@ -0,0 +1,2 @@ +gmake +libtinyX11 diff --git a/pack/libXft-2.3.2/tar b/pack/libXft-2.3.2/tar @@ -0,0 +1 @@ +https://www.x.org/releases/individual/lib/libXft-2.3.2.tar.gz diff --git a/pack/libexpat b/pack/libexpat @@ -0,0 +1 @@ +libexpat-2.2.6+ \ No newline at end of file diff --git a/pack/libx11-1.5.0/build b/pack/libexpat-2.2.6/build diff --git a/pack/libexpat-2.2.6/tar b/pack/libexpat-2.2.6/tar @@ -0,0 +1 @@ +https://github.com/libexpat/libexpat/releases/download/R_2_2_6/expat-2.2.6.tar.bz2 diff --git a/pack/libfontconfig b/pack/libfontconfig @@ -0,0 +1 @@ +libfontconfig-2.13.1+ \ No newline at end of file diff --git a/pack/libfontconfig-2.13.1/build b/pack/libfontconfig-2.13.1/build @@ -0,0 +1,14 @@ +#!/bin/sh -ex + +export FREETYPE_CFLAGS='-I/opt/libfreetype/include' +export FREETYPE_LIBS='-L/opt/libfreetype/lib -lfreetype' +export UUID_CFLAGS='-I/opt/libuuid/include' +export UUID_LIBS='-L/opt/libuuid/lib -luuid' +export EXPAT_CFLAGS='-I/opt/libexpat/include' +export EXPAT_LIBS='-L/opt/libexpat/lib -lexpat' + +./configure --prefix="$PREFIX" \ + --disable-nls \ + --disable-iconv \ + --enable-static +make install diff --git a/pack/libfontconfig-2.13.1/dep b/pack/libfontconfig-2.13.1/dep @@ -0,0 +1,5 @@ +gmake +gperf +libexpat +libfreetype +libuuid diff --git a/pack/libfontconfig-2.13.1/tar b/pack/libfontconfig-2.13.1/tar @@ -0,0 +1 @@ +https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.13.1.tar.gz diff --git a/pack/libfreetype b/pack/libfreetype @@ -0,0 +1 @@ +libfreetype-2.4.9+ \ No newline at end of file diff --git a/pack/libfreetype-2.4.9/build b/pack/libfreetype-2.4.9/build @@ -0,0 +1,6 @@ +#!/bin/sh -ex + +./configure --prefix="$PREFIX" +make install + +ln -s "$PREFIX/include/freetype2/"* "$PREFIX/include" diff --git a/pack/libx11-1.5.0/dep b/pack/libfreetype-2.4.9/dep diff --git a/pack/libfreetype-2.4.9/tar b/pack/libfreetype-2.4.9/tar @@ -0,0 +1 @@ +https://download.savannah.gnu.org/releases/freetype/freetype-2.9.1.tar.gz diff --git a/pack/libtinyX11 b/pack/libtinyX11 @@ -0,0 +1 @@ +libtinyX11-git+ \ No newline at end of file diff --git a/pack/libtinyX11-git/build b/pack/libtinyX11-git/build @@ -0,0 +1,7 @@ +#!/bin/sh -ex + +find . -type l \( -name '*.so.*' -o -name '*.so' \) -exec rm {} + +cp "$PACK/standard_definitions.mk" . +make +mkdir -p "$PREFIX/include/X11" "$PREFIX/lib" "$PREFIX/share/X11/XKeysymDB" +make PREFIX="$PREFIX" install diff --git a/pack/libtinyX11-git/git b/pack/libtinyX11-git/git @@ -0,0 +1 @@ +git://github.com/idunham/tinyxlib diff --git a/pack/libtinyX11-git/standard_definitions.mk b/pack/libtinyX11-git/standard_definitions.mk @@ -0,0 +1,14 @@ +CC=cc +COMPFLAGS=-pipe -Os -Wall -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_GNU_SOURCE -fno-strength-reduce -nodefaultlibs -fno-strict-aliasing -I. -ffunction-sections -fdata-sections -fPIC +COMMONDEFS=$(COMPFLAGS) -D_BSD_SOURCE -D_GNU_SOURCE -DUSECMS +LDFLAGS=-Wl,--gc-sections,--sort-common,-s + +LINKDIR=-L/lib +PREDIR=${PREFIX} +LIBDIR=${PREDIR}/lib +INCDIR=${PREDIR}/include + +#If you do not have setlocale, set this: +#COMMONDEFS+= -DX_LOCALE -DXLOCALEDIR=\"/usr/share/locale\" +#KEYSYMDB=/usr/X11R7/lib/X11/XKeysymDB +KEYSYMDB=${PREDIR}/share/X11/XKeysymDB diff --git a/pack/libuuid b/pack/libuuid @@ -0,0 +1 @@ +libuuid-1.0.3+ \ No newline at end of file diff --git a/pack/libx11-1.5.0/build b/pack/libuuid-1.0.3/build diff --git a/pack/libuuid-1.0.3/tar b/pack/libuuid-1.0.3/tar @@ -0,0 +1 @@ +http://sourceforge.net/projects/libuuid/files/libuuid-1.0.3.tar.gz diff --git a/pack/libx11 b/pack/libx11 @@ -1 +0,0 @@ -libx11-1.5.0- \ No newline at end of file diff --git a/pack/libx11-1.5.0/tar b/pack/libx11-1.5.0/tar @@ -1 +0,0 @@ -https://www.x.org/releases/X11R7.7/src/lib/libX11-1.5.0.tar.bz2 diff --git a/pack/libz-1.2.11/tar b/pack/libz-1.2.11/tar @@ -1 +1 @@ -https://www.zlib.net/zlib-1.2.11.tar.xz +http://zlib.net/zlib-1.2.11.tar.gz diff --git a/pack/s6-portable-utils-2.2.1.1/build b/pack/s6-portable-utils-2.2.1.1/build @@ -2,8 +2,8 @@ ./configure \ --prefix="$PREFIX" \ - --with-sysdeps=/opt/libskarnet/lib/skalibs/sysdeps \ - --with-include=/opt/libskarnet/include \ - --with-lib=/opt/libskarnet/lib/skalibs + --with-sysdeps=/opt/libskarnet-2.7.0.0/lib/skalibs/sysdeps \ + --with-include=/opt/libskarnet-2.7.0.0/include \ + --with-lib=/opt/libskarnet-2.7.0.0/lib/skalibs gmake install diff --git a/pack/s6-portable-utils-2.2.1.1/dep b/pack/s6-portable-utils-2.2.1.1/dep @@ -1 +1,2 @@ +libskarnet-2.7.0.0 gmake diff --git a/pack/sacc b/pack/sacc @@ -1 +1 @@ -sacc-1.00- \ No newline at end of file +sacc-git+ \ No newline at end of file diff --git a/pack/sacc-git/build b/pack/sacc-git/build @@ -0,0 +1,4 @@ +#!/bin/sh -ex + +cp "$PACK/config.mk" . +make PREFIX="$PREFIX" install diff --git a/pack/sacc-git/config.mk b/pack/sacc-git/config.mk @@ -0,0 +1,11 @@ +# Install paths +PREFIX = /usr/local +MANDIR = $(PREFIX)/share/man/man1 + +# UI type +# txt (textual) +#UI=txt +# ti (screen-oriented) +UI = ti +LIBS = -L/opt/libcurses/lib -lcurses -ltermcap -static +CFLAGS = -I/opt/libcurses/include diff --git a/pack/sacc-git/dep b/pack/sacc-git/dep @@ -0,0 +1,2 @@ +gmake +libcurses diff --git a/pack/sacc-git/git b/pack/sacc-git/git @@ -0,0 +1 @@ +git://bitreich.org/sacc diff --git a/pack/tinyxorg b/pack/tinyxorg @@ -0,0 +1 @@ +tinyxorg-git+ \ No newline at end of file diff --git a/pack/tinyxorg-git/build b/pack/tinyxorg-git/build @@ -0,0 +1,6 @@ +#!/bin/sh -ex + +cp "$PACK/standard_definitions.mk" . +make +make xinit +make DESTDIR="$PREFIX" install diff --git a/pack/tinyxorg-git/dep b/pack/tinyxorg-git/dep @@ -0,0 +1,2 @@ +libtinyX11 +libz diff --git a/pack/tinyxorg-git/git b/pack/tinyxorg-git/git @@ -0,0 +1 @@ +git://github.com/idunham/tinyxserver diff --git a/pack/tinyxorg-git/standard_definitions.mk b/pack/tinyxorg-git/standard_definitions.mk @@ -0,0 +1,106 @@ + +CC= cc + +CFLAGs= -I/opt/libtinyX11/include -I/opt/libz/include +COMPFLAGS= -pipe -fPIC -Os -Wall \ +-D_BSD_SOURCE -D_GNU_SOURCE -D__KERNEL_STRICT_NAMES \ +-fno-strength-reduce -nodefaultlibs -fno-strict-aliasing \ +-ffunction-sections -fdata-sections -I. \ +$(CFLAGs) + +####extensions#### +DPMS=-DDPMSExtension +SCREENSAVER=-DSCREENSAVER +MIT-SHM=-DMITSHM +RENDER=-DRENDER +#FIXME:if not defined dont define PANORAMIX=-DPANORAMIX +SHAPE=-DSHAPE +SYNC=-DXSYNC +TOG-CUP=-DTOGCUP +XCMISC=-DXCMISC +XTEST=-DXTEST +XTRAP=-DXTRAP +XV=-DXV +RANDR=-DRANDR +XRECORD=-DXRECORD +FONTCACHE=-DNOFONTSERVERACCESS # -DFONTCACHE or -DNOFONTSERVERACCESS + +####not working#### +#XINPUT=-DXINPUT #NOT WORKING! +#XKB=-DXKB/XKB_IN_SERVER=-DXKB #NOT WORKING! + +####others#### +#SERVER_LOCK=-DSERVER_LOCK +#SMART_SCHEDULE=-DSMART_SCHEDULE +USE_RGB_TXT=-DUSE_RGB_TXT +#XDMCP=-DXDMCP +PANORAMIX=-DPANORAMIX + +####where to look for fonts/colors#### +# Puppy: +#FONTPATH=/usr/X11R7/lib/X11/fonts/misc/ +#RGB=/usr/X11R7/lib/X11/rgb +# Debian: +FONTPATH=/usr/share/fonts/X11/misc/ +RGB=/usr/share/X11/rgb + +#Lazyux +#FONTPATH="/usr/share/fonts/misc/,/usr/share/fonts/truetype/,/usr/share/fonts/X11/100dpi/,/usr/share/fonts/X11/75dpi/\" +#-DRGB_DB=\"/usr/share/X11/rgb.txt\" \ + +#all deactivated creates 543K Xvesa +#all activated creates 728K Xvesa +COMMONDEFS=$(COMPFLAGS) \ +-DNOERROR \ +-Dlinux \ +-D_POSIX_SOURCE \ +-D_BSD_SOURCE \ +-DTOSHIBA_SMM \ +-D_SVID_SOURCE \ +-D_GNU_SOURCE \ +-DX_LOCALE \ +-DKDRIVESERVER \ +-DGCCUSESGAS \ +-DDDXOSINIT \ +$(FONTCACHE) \ +-DNDEBUG \ +-DNARROWPROTO \ +-DPIXPRIV \ +$(XTEST) \ +-DFUNCPROTO=15 \ +-DCOMPILEDDEFAULTFONTPATH=\"${FONTPATH}\" \ +-DRGB_DB=\"${RGB}\" \ +-D_POSIX_C_SOURCE=2 \ +$(DPMS) \ +$(SYNC) \ +$(PANORAMIX) \ +$(SHAPE) \ +$(TOG-CUP) \ +$(MIT-SHM) \ +$(RENDER) \ +$(SCREENSAVER) \ +$(SERVER_LOCK) \ +$(SMART_SCHEDULE) \ +$(XCMISC) \ +$(XDMCP) \ +$(XTRAP) \ +$(XV) \ +$(XINPUT) \ +$(XKB) \ +$(XKB_IN_SERVER) \ +$(RANDR) \ +$(XRECORD) \ +$(USE_RGB_TXT) \ +$(PIXPRIV) \ +$(X_LOCALE) \ +$(XF86BIGFONT) \ +$(BIGREQS) \ +-D__KERNEL_STRICT_NAMES + +LINKDIR=-L/opt/libtinyX11/lib -L/opt/libz/lib +LDFLAGS=-static -Wl,--gc-sections,--sort-common,-s $(LINKDIR) + +PREDIR= +LIBDIR=lib +INCDIR=include +BINDIR=bin