# This is template file for abuild with explanations # you can use this template as base for your package abuild # all commented lines can be removed to keep it simple and clean. # uncomment necessary optional variables/functions as needed # 'name', 'version' and 'release' is required as it will be used in package database # must be the same as directory name. name=mypkg # should use version number from package upstream as possible version=1.2.3 # does not follow any number from package upstream # must be increment number from 1 # must reset to 1 when 'version' is changed # must not contain any character other than increment number from 1 # can be use to bump package when package need rebuild without source changed release=1 # if no source defined, empty package will be created, good for making meta packages # must use '$name' and '$version' variable so updating packages will be easier # 4 format acceptable can be used: # * - just regular source tarball url # * :: - good to use when upstream source tarball name is not in proper format # * ::noextract - to skip extracting the source tarball # * - when its not a url, the is expected exist inside package abuild recipe directory #source="https://anyurl.com/$name-$version.tar.gz $name-$version.tar.gz::https://anyurl.com/$version.tar.gz https://anyurl.com/$name-$version.tar.gz::noextract file" # placed runit service with proper name in /etc/sv # this is acceptable name for runit service file: # * run - /etc/sv/$name/run # * - /etc/sv//run # * .run - /etc/sv//run # * finish - /etc/sv/$name/finish # * .finish - /etc/sv//finish #sv="run .run finish .finish" # auto build system already use regular options like --prefix, --sysconfdir, --libdir and etc # use this to add the optional opts or to override the one in defaults (see 'defaultbuildopts' file) #build_opt="" # skipping auto apply patch #skip_patch=1 # define patch opts to use other than default (-p1) #patch_opt="-p1" # keep static libraries (*.a) in packages #keep_static=1 # keep libtool files (*.la) in packages #keep_libtool=1 # keep locales in packages (/usr/share/locale and /usr/lib/locale) #keep_locale=1 # keep documentations in packages (/usr/share/doc) #keep_doc=1 # use this to force which build_type to use (if available) # by default build_type will be automatically detected # list available build_type (in order when autodetect) # * meson_build # * configure_build # * cmake_build # * python_build # * perlmodule_build # * makefile_build #build_type="" # override auto build system by using 'build()', 'prebuild()', and/or 'postbuild()' function # NOTE: when 'build()' is used, 'prebuild()' and 'postbuild()' will be ignored # theres 2 variable can be used in these function # * $PKG - is fakeroot location where all package files is installed before packaging # * $SRC - is where source is extracted #prebuild() { # # do whatever needed before compiling # # eg: fix whatever bug # sed -i 's/need to changed/to this/g' src/whateverfile #} # #postbuild() { # # do whatever needed after files installed to $PKG, before packaging occur # # eg: move binary to correct location # mkdir -p $PKG/usr/sbin # mv $PKG/usr/bin/binary $PKG/usr/sbin #} # #build() { # sed -i 's/need to changed/to this/g' src/whateverfile # ./configure --prefix=/usr # make # make DESTDIR=$PKG install # mkdir -p $PKG/usr/sbin # mv $PKG/usr/bin/binary $PKG/usr/sbin #}