1 # Build recipe for hierarchyfs.
3 # Copyright (c) 2017-2021 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Exit immediately on any error
25 # Define a category for the output of the package name
29 Skeleton bases of Dragora GNU/Linux-Libre.
31 It contains the main hierarchy of directories, symlinks,
32 ownerships, and permissions for compose the basic structure
36 homepage=https://www.dragora.org
84 usr/local/lib/pkgconfig \
88 usr/local/share/info \
89 usr/local/share/man/man1 \
90 usr/local/share/man/man2 \
91 usr/local/share/man/man3 \
92 usr/local/share/man/man4 \
93 usr/local/share/man/man5 \
94 usr/local/share/man/man6 \
95 usr/local/share/man/man7 \
96 usr/local/share/man/man8 \
124 cp -p "${worktree}/archive/hierarchyfs/README.media" \
126 cp -p "${worktree}/archive/hierarchyfs/README.mnt" \
129 chmod 644 "media/README" "mnt/README"
131 # Copy files for the already created root account
132 cp -p "${worktree}"/archive/etc/skel/.*rc \
133 "${worktree}"/archive/etc/skel/.profile \
137 "media/.graft-config" "mnt/.graft-config" "root/.graft-config"
139 # Manually include the post-install file for the package
141 mkdir -p "${destdir}/var/lib/qi"
143 cp -p "${CWD}/post-install.multidir" "${destdir}/var/lib/qi/${full_pkgname}.sh"
144 chmod 644 "${destdir}/var/lib/qi/${full_pkgname}.sh"
146 # Handle lib<equal> for the multi directory support
148 # Guess the suffix to compose the corresponding library directory
149 if test -f /tools/etc/stage1_is-multi-directory
151 libSuffix=$(cat /tools/etc/stage1_is-multi-directory)
154 if test -n "$libSuffix"
156 echo "libSuffix detected."
157 echo "Changing value for post-install '${libSuffix}'"
159 sed -i s"/^libSuffix=X/libSuffix=${libSuffix}/" \
160 "${destdir}/var/lib/qi/${full_pkgname}.sh"