pthbs

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

autotools (1326B)


      1 autotools_config() {
      2 	prefix={{versions}}/$pthbs_package
      3 	./configure -C \
      4 		--prefix="$prefix" \
      5 		--build="$(${CC:-gcc} -dumpmachine)" \
      6 		--bindir="$prefix/command" \
      7 		--sbindir="$prefix/command" \
      8 		--infodir="$prefix/info" \
      9 		--localedir="$prefix/locale" \
     10 		--mandir="$prefix/man" \
     11 		--libdir="$prefix/library" \
     12 		--docdir="$prefix/doc/{{name}}" \
     13 		--datadir="$prefix/data" \
     14 		--datarootdir="$prefix/data" \
     15 		--localstatedir='{{var_dir}}' \
     16 		"$@"
     17 {#
     18 		# --libexecdir=DIR        program executables [EPREFIX/libexec]
     19 		# --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
     20 		# --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
     21 		# --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
     22 		# --includedir=DIR        C header files [PREFIX/include]
     23 		# --oldincludedir=DIR     C header files for non-gcc [/usr/include]
     24 		# --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
     25 		# --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
     26 	# ac_cv_func_malloc_0_nonnull=yes \
     27 	# ac_cv_func_realloc_0_nonnull=yes
     28 #}
     29 }
     30 
     31 autotools() {
     32 	cd "$1"
     33 	shift
     34 	autotools_config "$@"
     35 	{{make}}
     36 	make DESTDIR="$pthbs_destdir" install
     37 }
     38 
     39 autotools_static() {
     40 	build_env_static
     41 	autotools "$@" --enable-static --disable-shared
     42 }