freetype:update and moved to /usr/lib
[nyanlinux.git] / builders / dwm-0 / builder.sh
blobaea4c6a5dc39c5090f2d84638b20cdd9d72f3aac
1 src_name=dwm
2 git_commit=f09418bbb6651ab4c299cfefbe1d18de401f630e
3 git_url0=https://git.suckless.org/dwm
5 slot=0
7 pkg_dir=/run/pkgs/$pkg_name
8 src_dir=$src_dir_root/$src_name
9 rm -Rf $pkg_dir
10 mkdir -p /run/pkgs
11 cp -r $src_dir $pkg_dir
13 #-------------------------------------------------------------------------------
15 cd $pkg_dir
17 git checkout --force $git_commit
18 git reset --hard
20 cp $nyan_root/builders/$pkg_name/dwm-actualfullscreen-20191112-cb3f58a.diff ./
21 patch -N -p 1 -i dwm-actualfullscreen-20191112-cb3f58a.diff
23 #-------------------------------------------------------------------------------
25 build_dir=/run/builds/$pkg_name
26 rm -Rf $build_dir
27 mkdir -p $build_dir
28 cd $build_dir
30 # install our config.h
31 cp $nyan_root/builders/dwm-$slot/config.h ./
33 version=6.3
35 cppflags="\
36 -DVERSION=\"$version\" \
37 -I$build_dir \
38 -I/nyan/xorgproto/current/include \
39 -I/nyan/libX11/current/include \
40 -I/nyan/libXft/current/include \
41 -I/nyan/freetype/current/include/freetype2 \
42 -I/nyan/fontconfig/current/include \
43 -I/nyan/libXrender/current/include \
46 ldflags="\
47 -L/nyan/libX11/current/lib \
48 -L/nyan/freetype/current/lib \
49 -L/nyan/libXft/current/lib \
50 -L/nyan/fontconfig/current/lib \
53 libs="\
54 -lX11 \
55 -lfreetype \
56 -lXft \
57 -lfontconfig \
60 gcc -Os -pipe -static-libgcc -c $cppflags $pkg_dir/drw.c -o $build_dir/drw.o
61 gcc -Os -pipe -static-libgcc -c $cppflags $pkg_dir/dwm.c -o $build_dir/dwm.o
62 gcc -Os -pipe -static-libgcc -c $cppflags $pkg_dir/util.c -o $build_dir/util.o
64 gcc -pipe -static-libgcc -B/nyan/glibc/current/lib $ldflags $libs -o $build_dir/dwm \
65 $build_dir/drw.o $build_dir/dwm.o $build_dir/util.o \
66 -Wl,-rpath-link,\
67 /nyan/glibc/current/lib:\
68 /nyan/libXrender/current/lib:\
69 /nyan/libxcb/current/lib:\
70 /nyan/libXau/current/lib
72 mkdir -p /nyan/dwm/$slot/bin
73 cp -f $build_dir/dwm /nyan/dwm/$slot/bin
74 strip -s /nyan/dwm/$slot/bin/dwm
76 rm -Rf $build_dir $pkg_dir
77 rmdir /run/pkgs /run/builds