Skip to content

Commit 81d02c2

Browse files
priyanshu shrivastavapriyanshu shrivastava
priyanshu shrivastava
authored and
priyanshu shrivastava
committed
Moved .pc files and added pkgconf test
1 parent 46fb10a commit 81d02c2

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

brew.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,24 @@ pipeline:
5454
set -x
5555
mkdir -p ${{targets.destdir}}/home/linuxbrew/.linuxbrew/
5656
cp -a ./brew/bin/ ./brew/Library/ ./brew/package/ ${{targets.destdir}}/home/linuxbrew/.linuxbrew/
57+
58+
# Create pkgconfig directory and properly relocate .pc files
59+
mkdir -p ${{targets.destdir}}/usr/lib/pkgconfig/
60+
find ${{targets.destdir}}/home/linuxbrew -name "*.pc" | while read pc_file; do
61+
filename=$(basename "$pc_file")
62+
orig_dir=$(dirname "$pc_file")
63+
64+
# Move the file to pkgconfig
65+
mv "$pc_file" "${{targets.destdir}}/usr/lib/pkgconfig/$filename"
66+
67+
# Ensure original directory still exists
68+
mkdir -p "$orig_dir"
69+
70+
# Create relative symlink
71+
ln -s "../../../../../usr/lib/pkgconfig/$filename" "$pc_file"
72+
done
73+
74+
# Create profile.d script
5775
mkdir -p ${{targets.destdir}}/etc/profile.d/
5876
echo "export PATH=\$PATH:/home/linuxbrew/.linuxbrew/bin" > ${{targets.destdir}}/etc/profile.d/brew.sh
5977
echo "export HOMEBREW_NO_AUTO_UPDATE=1" >> ${{targets.destdir}}/etc/profile.d/brew.sh
@@ -79,3 +97,4 @@ test:
7997
- runs: |
8098
. /etc/profile.d/brew.sh
8199
HOME=/root brew --version
100+
- uses: test/pkgconf

0 commit comments

Comments
 (0)