Skip to content

Commit 94dd199

Browse files
.pc file modification before moving and bumped epoch.
1 parent 3d2c295 commit 94dd199

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

ninja-build.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
package:
1010
name: ninja-build
1111
version: 1.12.1
12-
epoch: 1
12+
epoch: 2
1313
description: "Ninja is a small build system with a focus on speed."
1414
copyright:
1515
- license: Apache-2.0
@@ -43,14 +43,19 @@ pipeline:
4343

4444
- uses: cmake/install
4545

46-
- runs: |
47-
# Relocate .pc files to /usr/lib/pkgconfig and create symlinks
46+
- runs: |
47+
# Relocate .pc files to /usr/lib/pkgconfig
4848
mkdir -p "${{targets.destdir}}"/usr/lib/pkgconfig/
49-
find "${{targets.destdir}}"/usr/lib/ninja-build/lib/pkgconfig -name "*.pc" | while read pc_file; do
50-
if [ ! -L "$pc_file" ]; then
51-
mv "$pc_file" "${{targets.destdir}}"/usr/lib/pkgconfig/$(basename "$pc_file")
52-
ln -s "${{targets.destdir}}"/usr/lib/pkgconfig/$(basename "$pc_file") "$pc_file"
49+
50+
find "${{targets.destdir}}"/usr/lib/ninja-build/lib/pkgconfig -type f -name "*.pc" | while read -r pc_file; do
51+
dname=$(printf "${pc_file}" | sed -e "s,${{targets.destdir}},,")
52+
dname=$(dirname "${dname}")
53+
# Adjust "pcfiledir" so that it reflects the right location of each .pc file.
54+
if grep -q "pcfiledir" "${pc_file}"; then
55+
sed -i -e "s,\${pcfiledir},${dname}," "${pc_file}"
5356
fi
57+
# Move the .pc file to /usr/lib/pkgconfig/
58+
mv "${pc_file}" "${{targets.destdir}}"/usr/lib/pkgconfig/
5459
done
5560
5661
update:

0 commit comments

Comments
 (0)