Update library scripts to use only major/micro version numbers, and to
only add a symlink for linking (let ldconfig make symlinks for sonames).
This commit is contained in:
parent
ec8bcba829
commit
444fca6eff
|
@ -10,11 +10,8 @@ echo "Installing libraries into '${LIBDIR}'"
|
|||
install_file ${@CNAME@} ${LIBDIR} 0755 || return 1
|
||||
BASE="${@CNAME@_BASE}.so"
|
||||
MAJOR="${BASE}.${SOMAJOR}"
|
||||
MINOR="${MAJOR}.${SOMINOR}"
|
||||
MICRO="${MINOR}.${SOMICRO}"
|
||||
install_symlink "${MINOR}" "${MICRO}" "${LIBDIR}"
|
||||
install_symlink "${MAJOR}" "${MINOR}" "${LIBDIR}"
|
||||
install_symlink "${BASE}" "${MAJOR}" "${LIBDIR}"
|
||||
MICRO="${MAJOR}.${SOMICRO}"
|
||||
install_symlink "${BASE}" "${MICRO}" "${LIBDIR}"
|
||||
|
||||
# install header
|
||||
echo "Installing header file '${@CNAME@_HEADER}' into ${INCLUDEDIR}"
|
||||
|
|
|
@ -11,7 +11,7 @@ then
|
|||
@CNAME@_BASE=@NAME@
|
||||
source src/@NAME@/soversion
|
||||
|
||||
@CNAME@="obj/${@CNAME@_BASE}.so.${SOMAJOR}.${SOMINOR}.${SOMICRO}"
|
||||
@CNAME@="obj/${@CNAME@_BASE}.so.${SOMAJOR}.${SOMICRO}"
|
||||
@CNAME@_DEP_CFLAGS="" # @TODO@ cflags
|
||||
@CNAME@_DEP_LIBS="" # @TODO@ libs
|
||||
SO_EXTRA="${@CNAME@_DEP_CFLAGS} ${@CNAME@_DEP_LIBS} -lstdc++ -lc"
|
||||
|
@ -34,7 +34,7 @@ then
|
|||
then
|
||||
echo " Compiling"
|
||||
|
||||
SONAME="${@CNAME@_BASE}.so.${SOMAJOR}.${SOMINOR}"
|
||||
SONAME="${@CNAME@_BASE}.so.${SOMAJOR}"
|
||||
do_cmd ${CXX} ${CFLAGS} -Iobj -shared -fpic -o "${@CNAME@}" \
|
||||
-Wl,-soname,${SONAME} \
|
||||
${SRC} ${SO_EXTRA} || return 1
|
||||
|
|
|
@ -7,11 +7,9 @@
|
|||
|
||||
|
||||
|
||||
# SOMAJOR and SOMINOR are included in the library's soname. They need to
|
||||
# be bumped on a binary-incompatible release. They are both single
|
||||
# integers.
|
||||
# SOMAJOR is included in the library's soname, and needs to be bumped
|
||||
# after a binary-incompatible release. It is a single integer.
|
||||
SOMAJOR=0
|
||||
SOMINOR=0
|
||||
|
||||
# SOMICRO is bumped every time there is a binary-compatible release.
|
||||
SOMICRO=0
|
||||
|
|
|
@ -10,11 +10,8 @@ echo "Installing libraries into '${LIBDIR}'"
|
|||
install_file ${@CNAME@} ${LIBDIR} 0755 || return 1
|
||||
BASE="${@CNAME@_BASE}.so"
|
||||
MAJOR="${BASE}.${SOMAJOR}"
|
||||
MINOR="${MAJOR}.${SOMINOR}"
|
||||
MICRO="${MINOR}.${SOMICRO}"
|
||||
install_symlink "${MINOR}" "${MICRO}" "${LIBDIR}"
|
||||
install_symlink "${MAJOR}" "${MINOR}" "${LIBDIR}"
|
||||
install_symlink "${BASE}" "${MAJOR}" "${LIBDIR}"
|
||||
MICRO="${MAJOR}.${SOMICRO}"
|
||||
install_symlink "${BASE}" "${MICRO}" "${LIBDIR}"
|
||||
|
||||
# install header
|
||||
echo "Installing header file '${@CNAME@_HEADER}' into ${INCLUDEDIR}"
|
||||
|
|
|
@ -11,7 +11,7 @@ then
|
|||
@CNAME@_BASE=@NAME@
|
||||
source src/@NAME@/soversion
|
||||
|
||||
@CNAME@="obj/${@CNAME@_BASE}.so.${SOMAJOR}.${SOMINOR}.${SOMICRO}"
|
||||
@CNAME@="obj/${@CNAME@_BASE}.so.${SOMAJOR}.${SOMICRO}"
|
||||
@CNAME@_DEP_CFLAGS="" # @TODO@ cflags
|
||||
@CNAME@_DEP_LIBS="" # @TODO@ libs
|
||||
SO_EXTRA="${@CNAME@_DEP_CFLAGS} ${@CNAME@_DEP_LIBS} -lc"
|
||||
|
@ -34,7 +34,7 @@ then
|
|||
then
|
||||
echo " Compiling"
|
||||
|
||||
SONAME="${@CNAME@_BASE}.so.${SOMAJOR}.${SOMINOR}"
|
||||
SONAME="${@CNAME@_BASE}.so.${SOMAJOR}"
|
||||
do_cmd ${CC} ${CFLAGS} -Iobj -shared -fpic -o "${@CNAME@}" \
|
||||
-Wl,-soname,${SONAME} \
|
||||
${SRC} ${SO_EXTRA} || return 1
|
||||
|
|
|
@ -7,11 +7,9 @@
|
|||
|
||||
|
||||
|
||||
# SOMAJOR and SOMINOR are included in the library's soname. They need to
|
||||
# be bumped on a binary-incompatible release. They are both single
|
||||
# integers.
|
||||
# SOMAJOR is included in the library's soname, and needs to be bumped
|
||||
# after a binary-incompatible release. It is a single integer.
|
||||
SOMAJOR=0
|
||||
SOMINOR=0
|
||||
|
||||
# SOMICRO is bumped every time there is a binary-compatible release.
|
||||
SOMICRO=0
|
||||
|
|
|
@ -8,7 +8,6 @@ then
|
|||
echo " minor - bump minor version, reset micro"
|
||||
echo " micro - bump micro version"
|
||||
echo " libmajor LIB - as major but for soversion"
|
||||
echo " libminor LIB - as minor but for soversion"
|
||||
echo " libmicro LIB - as micro but for soversion"
|
||||
echo " tag - tag version"
|
||||
echo " push - do a git-push with --tags"
|
||||
|
@ -54,11 +53,6 @@ bump_somajor() {
|
|||
edit_versions "src/$1/soversion" "SOMAJOR" "$[${SOMAJOR} + 1]" "SOMINOR" "0" "SOMICRO" "0"
|
||||
}
|
||||
|
||||
bump_sominor() {
|
||||
source src/$1/soversion
|
||||
edit_versions "src/$1/soversion" "SOMINOR" "$[${SOMINOR} + 1]" "SOMICRO" "0"
|
||||
}
|
||||
|
||||
bump_somicro() {
|
||||
source src/$1/soversion
|
||||
edit_versions "src/$1/soversion" "SOMICRO" "$[${SOMICRO} + 1]"
|
||||
|
@ -96,11 +90,6 @@ do
|
|||
shift
|
||||
;;
|
||||
|
||||
libminor)
|
||||
bump_sominor $2
|
||||
shift
|
||||
;;
|
||||
|
||||
libmicro)
|
||||
bump_somicro $2
|
||||
shift
|
||||
|
|
Loading…
Reference in New Issue