- move 3 more scrpts to rpm-build-macros package
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 6 Jan 2020 08:08:16 +0000 (17:08 +0900)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 6 Jan 2020 08:08:16 +0000 (17:08 +0900)
rpm-compress-doc [deleted file]
rpm-find-spec-bcond [deleted file]
rpm-mimetypedeps [deleted file]
rpm.spec

diff --git a/rpm-compress-doc b/rpm-compress-doc
deleted file mode 100644 (file)
index 3c5ff93..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/sh
-#
-# Compress documentation files found in $DOCDIR. Omit some files we don't
-# want to get compressed.
-#
-# /etc/rpm/noautocompressdoc and --noautocompressdoc= option can contain
-# whitespace delimated list of patters to omit.
-#
-
-#set -x
-
-COMPRESS_CMD="gzip -9nf"
-EXCLUDE_SUFFIXES="htm html jpg jpeg png gif pdf css dia js abw HTM JPG PNG GIF PDF CSS JS"
-EXCLUDE_MASKS=
-RECOMPRESS_BZIP2=yes
-
-nocompressdoc=''
-while [ $# -gt 0 ]; do
-       case "$1" in
-         --noautocompressdoc=*)
-               EXCLUDE_MASKS=`echo "${1#--noautocompressdoc=}" | sed -e 's/^ *//;s/ *$//;s/ \+/|/g'`
-       esac
-       shift
-done
-
-if [ -r /etc/rpm/noautocompressdoc ]; then
-       exclude=$(cat /etc/rpm/noautocompressdoc | grep -v '^#' | xargs echo | sed -e 's/^ *//;s/ *$//;s/ \+/|/g')
-       if [ -n "${exclude}" ]; then
-               if [ -n "${EXCLUDE_MASKS}" ]; then
-                       EXCLUDE_MASKS="${EXCLUDE_MASKS}|${exclude}"
-               else
-                       EXCLUDE_MASKS="${exclude}"
-               fi
-       fi
-fi
-
-if [ "$DOCDIR" = "" ] ; then
-       echo '$DOCDIR not set; exiting.'
-       exit 1
-fi
-
-cd $DOCDIR
-
-echo "Compressing documentation in $DOCDIR..."
-
-if test "$EXCLUDE_MASKS" ; then
-       echo "Excluding pattern '$EXCLUDE_MASKS'"
-fi
-
-FIND_CMD="find . -type f "
-for SUF in $EXCLUDE_SUFFIXES ; do
-       FIND_CMD="$FIND_CMD -a -not -name '*.$SUF'"
-done
-
-eval $FIND_CMD | while read FILENAME ; do
-       if test -n "$EXCLUDE_MASKS" ; then
-               if eval "case \$(basename \"$FILENAME\") in
-                        $EXCLUDE_MASKS ) true ;;
-                        * ) false ;;
-                        esac" ; then
-                       continue
-               fi
-       fi
-       case "$FILENAME" in
-       *.gz | *.Z)
-               gzip -d "$FILENAME"
-               FILENAME=$(echo "$FILENAME" | sed -e 's/\.gz$//; s/\.Z$//')
-               ;;
-       *.bz2)
-               if [ "$RECOMPRESS_BZIP2" = yes ] ; then
-                       bzip2 -d "$FILENAME"
-                       FILENAME=$(echo "$FILENAME" | sed -e 's/\.bz2$//')
-               else
-                       continue
-               fi
-               ;;
-       esac
-
-       $COMPRESS_CMD "$FILENAME"
-
-       echo -n "$FILENAME "
-done
-
-echo
-echo "Documentation compressed."
diff --git a/rpm-find-spec-bcond b/rpm-find-spec-bcond
deleted file mode 100644 (file)
index a11dece..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/sh
-# Display bcond (_with_*, _without_*) macros from given spec 
-# $Id$
-
-if [ "$#" = 0 ]; then
-    echo "Usage: $0 SPEC"
-    exit 1
-fi
-
-SPEC=$1
-if [ $SPEC = "--" ]; then
-    if [ "$#" -lt 2 ]; then
-       echo "Usage: rpmbuild --bcond SPEC"
-       exit 1
-    fi
-    SPEC=$2
-fi
-
-if [ ! -f $SPEC ]; then
-    echo "rpmbuild: $SPEC: no such file"
-    exit 1
-fi
-
-bconds=`awk -F"\n" 'BEGIN { chlog=0 }
-               /^%changelog/ { chlog=1 }
-               /_with(out)?_[_a-zA-Z0-9]+/ && chlog == 0 {
-                       match($0, /_with(out)?_[_a-zA-Z0-9]+/);
-                       print substr($0, RSTART, RLENGTH)                       
-               }
-               /^%bcond_with/ && chlog == 0 {
-                       match($0, /bcond_with(out)?[ \t]+[_a-zA-Z0-9]+/);
-                                bcond = substr($0, RSTART +5 , RLENGTH -5);
-                                gsub(/[ \t]+/,"_",bcond);
-                                print bcond
-                       }' $SPEC | sort -u`
-
-for c in $bconds; do
-    echo -n "$c"
-
-    if ! echo `rpm --eval "%$c"` | grep $c >/dev/null; then
-       echo " (on)"
-    else 
-       echo ""
-    fi
-done
-
-
-for bcond in $bconds; do
-    isset=`awk -F"\n" "BEGIN { val=0 }
-                   /^%define[\t ]+$bcond/ {
-                     if (match(\\$0, /$bcond[\t ]+0[\t ]*$/)) {
-                        val = 0
-                     } else if (match(\\$0, /$bcond[\t ]+1[\t ]*$/)) {
-                        val = 1
-                     } else {
-                        print \"couldn't determine $bcond value from \", \\$0
-                     }
-                  } END { print val }" $SPEC`;
-
-    if [ x"$isset" = x"1" ]; then
-       echo "WARN: $bcond defined in spec";
-    fi
-done
-        
diff --git a/rpm-mimetypedeps b/rpm-mimetypedeps
deleted file mode 100644 (file)
index 6c0176d..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-case $1 in
--P|--provides)
-       while read filename; do
-       case "$filename" in
-       *.desktop)
-               mime=$(awk -F= '/^MimeType=/{print $2}' "$filename")
-               IFS=';'
-               for type in $mime; do
-                       if [ -n "$type" ]; then
-                               echo "mimetype($type)"
-                       fi
-               done
-               ;;
-       esac
-       done
-       ;;
-esac
-
-exit 0
index ce56c646230699e307b980d00b04c59e4b933f62..45d0f242969fca950ff8030ba2d825105bebc2f7 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -43,10 +43,8 @@ Source0:     http://ftp.rpm.org/releases/rpm-4.15.x/%{name}-%{version}.tar.bz2
 Source1:       %{name}.groups
 Source2:       macros.pld
 Source3:       %{name}-install-tree
-Source4:       %{name}-find-spec-bcond
 Source5:       %{name}-hrmib-cache
 Source6:       %{name}-groups-po.awk
-Source7:       %{name}-compress-doc
 Source11:      perl.prov
 Source12:      %{name}-user_group.sh
 Source13:      %{name}.sysconfig
@@ -54,7 +52,6 @@ Source13:     %{name}.sysconfig
 Source15:      banner.sh
 Source16:      ftp://ftp.pld-linux.org/dists/th/PLD-3.0-Th-GPG-key.asc
 # Source16-md5:        23914bb49fafe7153cee87126d966461
-Source17:      %{name}-mimetypedeps
 Source18:      macros.local
 Source19:      %{name}.noautocompressdoc
 Source20:      %{name}.noautoprov
@@ -739,10 +736,7 @@ cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_rpmlibdir}/pld/macros
 cp -p %{SOURCE32} $RPM_BUILD_ROOT%{_rpmlibdir}/pld/rpmrc
 
 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_rpmlibdir}/install-build-tree
-cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_rpmlibdir}/find-spec-bcond
-cp -p %{SOURCE7} $RPM_BUILD_ROOT%{_rpmlibdir}/compress-doc
 cp -p %{SOURCE12} $RPM_BUILD_ROOT%{_rpmlibdir}/user_group.sh
-cp -p %{SOURCE17} $RPM_BUILD_ROOT%{_rpmlibdir}/mimetypedeps.sh
 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_rpmlibdir}/hrmib-cache
 cp -p %{SOURCE13} $RPM_BUILD_ROOT/etc/sysconfig/rpm
 
@@ -962,12 +956,9 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/noauto*
 %attr(755,root,root) %{_rpmlibdir}/brp-*
 %attr(755,root,root) %{_rpmlibdir}/check-files
-%attr(755,root,root) %{_rpmlibdir}/compress-doc
-%attr(755,root,root) %{_rpmlibdir}/find-spec-bcond
 %attr(755,root,root) %{_rpmlibdir}/install-build-tree
 %attr(755,root,root) %{_rpmlibdir}/elfdeps
 %attr(755,root,root) %{_rpmlibdir}/libtooldeps.sh
-%attr(755,root,root) %{_rpmlibdir}/mimetypedeps.sh
 # needs hacked pkg-config to return anything
 %attr(755,root,root) %{_rpmlibdir}/pkgconfigdeps.sh
 %attr(755,root,root) %{_rpmlibdir}/mkinstalldirs
This page took 0.065043 seconds and 4 git commands to generate.