8 package_info_load_name
() {
9 grep AC_INIT configure.ac | perl
-ne 's/^.+\(\[([-\w]*)\],.+$/$1/ and print'
11 package_info_load_version
() {
12 grep AC_INIT configure.ac | perl
-ne 's/^.+\[([-\w\.]*)\],$/$1/ and print'
16 [ -f "configure.ac" ] || \
17 die
"package_info_load: configure.ac is missing"
19 PACKAGE_NAME
="$(package_info_load_name)"
21 PACKAGE_TARNAME
="${PACKAGE_NAME}"
23 PACKAGE_VERSION
="$(package_info_load_version)"
25 [ "${PACKAGE_NAME}" -a "${PACKAGE_VERSION}" ] || \
26 die
"package information is missing from configure script"
29 [ "${PACKAGE_VERSION/-/}" = "${PACKAGE_VERSION}" ] || \
30 PACKAGE_VERSION_TAGS
="-${PACKAGE_VERSION#*-}"
31 PACKAGE_VERSION_BASE
="${PACKAGE_VERSION%%-*}"
32 PACKAGE_MICRO
="${PACKAGE_VERSION_BASE##*.}"
33 PACKAGE_MAJOR_AND_MINOR
="${PACKAGE_VERSION_BASE%.*}"
34 PACKAGE_MAJOR
="${PACKAGE_MAJOR_AND_MINOR%.*}"
35 PACKAGE_MINOR
="${PACKAGE_MAJOR_AND_MINOR#*.}"
37 [ "${RELEASE_FINAL}" ] \
38 && RELEASE_VERSION
="${PACKAGE_VERSION_BASE}" \
39 || RELEASE_VERSION
="${PACKAGE_VERSION/-dev/}"
40 PACKAGE_RELEASE
="${PACKAGE_TARNAME}-${RELEASE_VERSION}"
41 PACKAGE_STRING
="${PACKAGE_NAME} ${PACKAGE_VERSION}"
46 Name: ${PACKAGE_TARNAME}
47 Version: ${PACKAGE_VERSION}
48 Release: ${RELEASE_VERSION}
49 Number: ${PACKAGE_VERSION_BASE}
50 Series: ${PACKAGE_MAJOR_AND_MINOR}
51 Major: ${PACKAGE_MAJOR}
52 Minor: ${PACKAGE_MINOR}
53 Micro: ${PACKAGE_MICRO}
54 Tags: ${PACKAGE_VERSION_TAGS}
55 Full: ${PACKAGE_TARNAME}-${PACKAGE_VERSION_BASE}${PACKAGE_VERSION_TAGS}
56 Release: ${PACKAGE_RELEASE}