summaryrefslogtreecommitdiffstats
path: root/makedeps.sh
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2025-08-05 11:57:25 +0200
committerRemi Collet <remi@php.net>2025-08-05 11:57:25 +0200
commit00f941c88b62713a67074add2558024050b79a11 (patch)
tree3979567a11e6786ab325c43b1b5bb22b0d998ed8 /makedeps.sh
initial package
Diffstat (limited to 'makedeps.sh')
-rwxr-xr-xmakedeps.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/makedeps.sh b/makedeps.sh
new file mode 100755
index 0000000..99ce444
--- /dev/null
+++ b/makedeps.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+NAME=$(sed -n '/^Name:/{s/.* //;p}' *.spec)
+VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec)
+MODULE=$(sed -n '/^%global gh_proj/{s/.* //;p}' $NAME.spec)
+
+if [ -f $NAME-$VERSION.tgz ]; then
+ echo "+ Unpack"
+ tar xf $NAME-$VERSION.tgz
+
+ pushd $MODULE-$VERSION
+ echo "+ Fetch"
+ cargo vendor mycargo
+
+ echo "+ Pack"
+ tar czf ../$NAME-deps-$VERSION.tgz mycargo
+ popd
+else
+ echo $NAME-$VERSION.tgz missing
+fi