pthbs

Packaging Through Hashed Build Scripts
git clone https://ccx.te2000.cz/git/pthbs
Log | Files | Refs | Submodules | README

xbps (1705B)


      1 {% extends "autotools" %}
      2 {%- block extra_deps %}
      3 #+{{pkg_install_name("libarchive")}}
      4 #+{{pkg_install_name("libressl")}}
      5 #+{{pkg_install_name("pkgconf-pkg-config")}}
      6 #@untar:-z:sha256:a6607e83fcd654a0ae846d729e43fefd8da9a61323e91430f884caf895b4f59b:.
      7 {%- endblock %}
      8 {% block at_script %}
      9 {% include "functions/vars" %}
     10 
     11 export LDFLAGS=--static
     12 export CPPFLAGS="-D_GNU_SOURCE -DSTDC_HEADERS"
     13 build_env_static
     14 def_dest
     15 def_prefix
     16 
     17 cd xbps-0.59.2
     18 find lib bin -name '*.c' -exec sed -iEe '/^[\t ]*#[\t ]*define[\t ]+_GNU_SOURCE/d' '{}' \;
     19 find lib bin -name '*.c' -exec sed -iEe '/#.*_GNU_SOURCE/d' '{}' \;
     20 ./configure --verbose \
     21 	--prefix="$prefix" \
     22 	--build="$(${CC:-gcc} -dumpmachine)" \
     23 	--datadir="$prefix" \
     24 	--bindir="$prefix/command" \
     25 	--infodir="$prefix/info" \
     26 	--mandir="$prefix/man" \
     27 	--libdir="$prefix/library" \
     28 	--localstatedir=/var \
     29 	--enable-static
     30 
     31 {{make}} -C include
     32 {{make}} -C lib libxbps.a
     33 install -d "$dest/library"
     34 install -m 644 lib/libxbps.a "$dest/library"
     35 install -d "$dest/command"
     36 for cmd in xbps-alternatives xbps-create xbps-dgraph xbps-install xbps-pkgdb xbps-query xbps-reconfigure xbps-remove xbps-rindex xbps-uhelper xbps-checkvers xbps-fbulk xbps-digest xbps-fetch xbps-uchroot xbps-uunshare; do
     37 	{{make}} -C "bin/$cmd" "$cmd.static"
     38 	install -m 755 "bin/$cmd/$cmd.static" "$pthbs_destdir/$prefix/command"
     39 done
     40 {{make}} -C data
     41 {{make}} -C data install DESTDIR="$pthbs_destdir"
     42 	
     43 check_static command/xbps-install.static
     44 mkdir -p "$dest/keys"
     45 mv -v "$pthbs_destdir/var/db/xbps/keys" "$dest/keys/void"
     46 
     47 {% endblock %}
     48 {% block genlinks_begin %}
     49 	x["./command/xbps-install.static"]=1
     50 {%- endblock %}
     51 {% block rules %}
     52 $2 == "keys" { link($0); next }
     53 {% endblock -%}