38 lines
1.1 KiB
Bash
38 lines
1.1 KiB
Bash
build_target @NAME@
|
|
|
|
# make paths (this is for Gentoo in particular)
|
|
build_dir_tree "${LIBDIR}" || return 1
|
|
build_dir_tree "${BINDIR}" || return 1
|
|
build_dir_tree "${INCLUDEDIR}" || return 1
|
|
|
|
# install library
|
|
echo "Installing libraries into '${LIBDIR}'"
|
|
install_file ${@CNAME@} ${LIBDIR} 0755 || return 1
|
|
BASE="${@CNAME@_BASE}.so"
|
|
MAJOR="${BASE}.${SOMAJOR}"
|
|
MICRO="${MAJOR}.${SOMICRO}"
|
|
install_symlink "${BASE}" "${MICRO}" "${LIBDIR}"
|
|
|
|
# install header
|
|
echo "Installing header file '${@CNAME@_HEADER}' into ${INCLUDEDIR}"
|
|
install_header ${@CNAME@_HEADER} ${INCLUDEDIR} 0644 || return 1
|
|
|
|
# install config script
|
|
echo "Installing config script into ${BINDIR}"
|
|
CONFFILE="${INSTALL_PREFIX}${BINDIR}/@NAME@-config"
|
|
|
|
do_cmd rm -f "${CONFFILE}"
|
|
do_cmd_redir "${CONFFILE}" sed \
|
|
-e "s,@VERSION@,${VERSION}," \
|
|
-e "s,@DEP_CFLAGS@,${@CNAME@_DEP_CFLAGS}," \
|
|
-e "s,@DEP_LIBS@,${@CNAME@_DEP_LIBS}," \
|
|
-e "s,@LIB_DIR@,${LIBDIR}," \
|
|
-e "s,@INCLUDE_DIR@,${INCLUDEDIR}," \
|
|
src/@NAME@/config-script
|
|
|
|
do_cmd chmod 0755 "${CONFFILE}"
|
|
print_success "Done"
|
|
|
|
# kate: @KATE_MODELINE@
|
|
# vim: syntax=sh:@VIM_MODELINE@
|