summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2013-12-02 21:40:11 (EST)
committer P. J. McDermott <pj@pehjota.net>2014-08-15 08:54:29 (EDT)
commit470bfb57d1cb6f68d9f260ab8afe688ed46821d0 (patch)
treeeb4d6d307b443b5a4336a859055d1abfc2bf7bbf
parent6c02331b88c01e3f21081163acc19d81d16122e2 (diff)
lib/profiles/proteanos.sh: New file
-rw-r--r--lib/profiles/local.mk3
-rw-r--r--lib/profiles/proteanos.sh75
2 files changed, 77 insertions, 1 deletions
diff --git a/lib/profiles/local.mk b/lib/profiles/local.mk
index 5e6f535..5c78536 100644
--- a/lib/profiles/local.mk
+++ b/lib/profiles/local.mk
@@ -1 +1,2 @@
-pkgdataprofile_sources =
+pkgdataprofile_sources = \
+ lib/profiles/proteanos.sh
diff --git a/lib/profiles/proteanos.sh b/lib/profiles/proteanos.sh
new file mode 100644
index 0000000..965eb45
--- /dev/null
+++ b/lib/profiles/proteanos.sh
@@ -0,0 +1,75 @@
+# ProteanOS Development Kit
+# lib/profiles/proteanos.sh
+# ProteanOS architecture detection and feeds lists.
+#
+# Copyright (C) 2013 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/>.
+
+prof_proteanos_detect_arch()
+{
+ local uname_m=
+ local uname_s=
+ local arch=
+
+ uname_m="$((uname -m) 2>/dev/null)" || uname_m='unknown'
+ uname_s="$((uname -s) 2>/dev/null)" || uname_s='unknown'
+
+ case "${uname_m}:${uname_s}" in
+ 'x86_64:Linux')
+ arch='core-linux-eglibc'
+ ;;
+ *)
+ arch=''
+ esac
+
+ printf '%s\n' "${arch}"
+}
+
+prof_proteanos_feeds()
+{
+ local arch="${1}"
+ local plat="${2}"
+ local suite="${3}"
+ local archive=
+ local a=
+ local p=
+
+ archive='http://files.proteanos.com/pub/proteanos'
+
+ for a in "${arch}" 'all'; do
+ for p in "${plat}" 'all'; do
+ printf '%s_%s %s/feeds/%s/%s/%s/Packages\n' \
+ "${a}" "${p}" \
+ "${archive}" "${suite}" "${a}" "${p}"
+ done
+ done
+}
+
+prof_proteanos_dep_fields()
+{
+ printf 'Depends Pre-Depends'
+}
+
+prof_proteanos_include_pkg()
+{
+ local name="${1}"
+ local value="${2}"
+
+ if [ "x${name}" = 'xPackage' ] && [ "x${value}" = 'xbase' ]; then
+ return 0
+ else
+ return 1
+ fi
+}