diff options
author | P. J. McDermott <pjm@nac.net> | 2012-09-28 08:44:49 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-09-28 08:44:49 (EDT) |
commit | 962fb7438afe046fa12b0b02129340ae0e6c4ed3 (patch) | |
tree | 46cc9458ee0407441c1a8da1c43e43d4a63a7943 /lib/package | |
parent | 78cb303f9f9c29f5290e23b7370ad53f9486e759 (diff) |
Implement much of the "package" library modules.
Diffstat (limited to 'lib/package')
-rw-r--r-- | lib/package/2.sh | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/lib/package/2.sh b/lib/package/2.sh new file mode 100644 index 0000000..99397f2 --- /dev/null +++ b/lib/package/2.sh @@ -0,0 +1,52 @@ +# opkbuild +# lib/package/2 +# Functions for retrieving metadata from packages in SPF 2.0. +# +# Copyright (C) 2012 Patrick "P. J." McDermott +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +[ -n "${_OB_PACKAGE_2_SM}" ] && return 0 +_OB_PACKAGE_2_SM='true' + +_ob_parse_package_metadata_2() +{ + _ob_local + + # XXX: Stub. + + _ob_return 0 + return ${?} +} + +_ob_get_binary_packages_2() +{ + _ob_local _obgbp2_pkgs _obgbp2_pkg_control + + for _obgbp2_pkg_control in "${_OB_PACKAGE_DIR}/"*'.pkg/control'; do + + _obgbp2_pkg_control="${_obgbp2_pkg_control%.pkg/control}" + _obgbp2_pkg_control="${_obgbp2_pkg_control##*/}" + + ob_validate_binary_name "${_obgbp2_pkg_control}" + + _obgbp2_pkgs="${_obgbp2_pkgs} ${_obgbp2_pkg_control}" + + done + + _ob_set_binary_packages "${_obgbp2_pkgs}" + + _ob_return 0 + return ${?} +} |