mirror of
https://github.com/openwrt/packages.git
synced 2025-12-24 08:28:20 +04:00
ruby: refactor package to use more macros
ruby subpackages now are generated by a macro. This reduces the Makefile size by half and the chance of errors. No change in packages contents, install-size or dependencies, except for some removed doc files. Improved ruby_missingfiles and ruby_find_pkgsdeps script Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
This commit is contained in:
@@ -1,20 +1,28 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# bash feeds/packages/lang/ruby/ruby_missingfiles staging_dir/target-i386_i486_musl-1.1.11/ bin/x86/packages/packages/*ruby*_2.3.0*
|
||||
#
|
||||
|
||||
function list_staging_files {
|
||||
cd staging_dir/target-*/; find \
|
||||
cd "$1"; find \
|
||||
\( \( -name "root-x86" -or -name "packages" -or -name "stamp" -or -name "pkginfo" \) -prune \) -or -true \
|
||||
\( -path "*ruby*" -or -name "erb" -or -name "gem" -or -name "irb" -or -name "rake" -or -name "rdoc" -or -name "ri" -or -name "testrb" \) \
|
||||
-not -path "*/usr/include/*" -not -path "*/usr/lib/pkgconfig/*" -not -path "*/usr/lib/lib*.a" \
|
||||
-not -path "*/usr/lib/ruby/gems/*/cache/*" \
|
||||
-print | sort
|
||||
}
|
||||
|
||||
function list_ipkg_files {
|
||||
for OPKG in bin/*/packages/packages/*ruby*; do
|
||||
for OPKG; do
|
||||
tar --to-stdout -xzf "$OPKG" ./data.tar.gz | tar tz | sed -e 's%/$%%'
|
||||
done | sort -u
|
||||
}
|
||||
|
||||
|
||||
echo " Staging Packages"
|
||||
diff -y <(list_staging_files) <(list_ipkg_files)
|
||||
echo " Staging Packages"
|
||||
|
||||
: ${1:?First arg is staging_dir}
|
||||
: ${2:?Second and following args are ruby ipkg packages}
|
||||
STAGING_DIR=$1; shift
|
||||
diff -d -y <(list_staging_files "$STAGING_DIR") <(list_ipkg_files "$@")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user