mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
make, scripts: Add .pc to rpm packages
Next attempt on creating rpm with .pc file inside. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
e26fbeb0f7
commit
7aa477dcde
3 changed files with 5 additions and 78 deletions
|
|
@ -1,71 +0,0 @@
|
|||
echo "Name: $NAME"
|
||||
echo "Summary: Jannet IT Services Tool Library"
|
||||
echo "Version: $VERSION"
|
||||
echo "Release: $RELEASE"
|
||||
echo "License: LGPL"
|
||||
echo "Group: System Environment/Libraries"
|
||||
[ -n "$SOURCE" ] && echo "Source: $SOURCE"
|
||||
echo "Vendor: Jannet IT Services"
|
||||
echo "URL: http://www.jannet.de"
|
||||
echo "BuildRoot: /var/tmp/%{name}-buildroot"
|
||||
echo ""
|
||||
echo "%description"
|
||||
echo "This is a library providing easy-to-use interfaces for:"
|
||||
echo ""
|
||||
echo "+ platform independent logging"
|
||||
echo "+ platform independent locking"
|
||||
echo "+ platform independent threads"
|
||||
echo "+ platform independent profiling"
|
||||
echo "+ a platform independent config file reader"
|
||||
echo "+ shared memory"
|
||||
echo "+ a lightweight middleware suite"
|
||||
echo ""
|
||||
echo "It was originally designed to be a versatile pool of"
|
||||
echo "programming tools to be used in my projects as a freelancing"
|
||||
echo "software developer."
|
||||
echo ""
|
||||
echo "%package -n $NAME-run"
|
||||
echo "Summary: The runtime library package."
|
||||
echo "Group: System Environment/Libraries"
|
||||
echo "Provides: $NAME = $VERSION"
|
||||
echo "%description -n $NAME-run"
|
||||
echo "runtime library package of the ytools library"
|
||||
echo ""
|
||||
echo "%package -n $NAME-devel"
|
||||
echo "Summary: The development library package."
|
||||
echo "Group: System Environment/Libraries"
|
||||
if [ -n "$REQUIRES_DEVEL" ]; then echo "Requires: $REQUIRES_DEVEL"; fi
|
||||
echo "%description -n $NAME-devel"
|
||||
echo "development library package of the ytools library"
|
||||
echo ""
|
||||
#echo "%debug_package"
|
||||
echo "%prep"
|
||||
echo "%setup -q -n $NAME-$V"
|
||||
echo ""
|
||||
echo "%build"
|
||||
echo 'pwd'
|
||||
echo 'make config'
|
||||
echo 'make'
|
||||
echo ""
|
||||
echo "%install"
|
||||
echo "export ENV_PREFIX=\$RPM_BUILD_ROOT/"
|
||||
echo "export INSTALL_LOG=$INSTALL_LOG"
|
||||
echo "rm -rf `dirname $INSTALL_LOG`"
|
||||
echo "mkdir -p `dirname $INSTALL_LOG`"
|
||||
echo "> $INSTALL_LOG"
|
||||
echo "make install"
|
||||
echo "cat $INSTALL_LOG | sed \"s% \$RPM_BUILD_ROOT% %\" | grep -ve '"$FILTER_DEVEL"' > $INSTALL_LOG-run"
|
||||
echo "cat $INSTALL_LOG | sed \"s% \$RPM_BUILD_ROOT% %\" | grep -e '"$FILTER_DEVEL"' > $INSTALL_LOG-devel"
|
||||
echo ""
|
||||
echo "%post -n $NAME-run"
|
||||
if [ "$TARGET" != mingw ]; then
|
||||
echo "/opt/ytools/bin/jcs init"
|
||||
echo "if [ -x /sbin/mkinitrd_setup ]; then /sbin/mkinitrd_setup; fi"
|
||||
fi
|
||||
echo ""
|
||||
echo "%clean"
|
||||
echo "%files -n $NAME-run -f $INSTALL_LOG-run"
|
||||
echo "%files -n $NAME-devel -f $INSTALL_LOG-devel"
|
||||
echo '%defattr (-, root, root)'
|
||||
echo ""
|
||||
|
||||
|
|
@ -65,10 +65,7 @@ _cat << EOT
|
|||
|echo "mkdir -p \`dirname \$INSTALL_LOG\`"
|
||||
|echo "> \$INSTALL_LOG"
|
||||
|echo "make install"
|
||||
|echo "cat \$INSTALL_LOG | sed \"s% \\\$RPM_BUILD_ROOT% %\" | "
|
||||
|echo " grep -ve '/include/\|devel\|/lib.*\.a\$\|/make\(/\|$\)' | sort -u > \$INSTALL_LOG.\$NAME-run"
|
||||
|echo "cat \$INSTALL_LOG | sed \"s% \\\$RPM_BUILD_ROOT% %\" | "
|
||||
|echo " grep -e '/include/\|devel\|/lib.*\.a\$\|/make\(/\|$\)' | sort -u > \$INSTALL_LOG.\$NAME-devel"
|
||||
|echo "/bin/bash ./devutil/scripts/pkg.sh milk-install-log -p \\\$ENV_PREFIX -n \$NAME -t rpm \$INSTALL_LOG \`dirname \$INSTALL_LOG\`"
|
||||
|echo ""
|
||||
EOT
|
||||
ini_value global.subpackages | grep -q run && _cat << EOT
|
||||
|
|
|
|||
|
|
@ -755,6 +755,7 @@ cmd_milk_install_log()
|
|||
milk_install_log_usage()
|
||||
{
|
||||
echo "usage: $myname [-h] [-n pkg-name] [-t rpm|deb] [-p remove-prefix] install-log output-dir"
|
||||
[ "$1" ] && exit $1
|
||||
}
|
||||
|
||||
milk_install_log_spec_attr()
|
||||
|
|
@ -799,13 +800,13 @@ cmd_milk_install_log()
|
|||
in=$1
|
||||
out=$2
|
||||
|
||||
local filter_devel='/include/.*.h$\|devel\|make\|lib.*\.a$\|lib.*\.so$\|.*\.exp$\|.*\.def$\|.*\.lib$\|\.pc$'
|
||||
local filter_devel='/include/.*.h$\|devel\|make\|lib.*\.a$\|lib.*\.so$\|.*\.exp$\|.*\.def$\|.*\.lib$\|.*\.pc$'
|
||||
|
||||
# TODO: simplify this
|
||||
case $type in
|
||||
rpm)
|
||||
cat $in | sed "s% $prefix% %//" | grep -ve $filter_devel > $out/files-$name-run
|
||||
cat $in | sed "s% $prefix% %//" | grep -e $filter_devel > $out/files-$name-devel
|
||||
cat $in | sed "s% $prefix% %" | grep -ve $filter_devel > $in.$name-run
|
||||
cat $in | sed "s% $prefix% %" | grep -e $filter_devel > $in.$name-devel
|
||||
;;
|
||||
deb)
|
||||
cat $in | grep -v "%dir" | sed "s% $prefix% %; s%//*%/%g; s/.*) *//" | grep -ve $filter_devel | sed 's/\(.*\)\/\([^/]\+\) *$/inst-root\1\/\2 \1/' > $out/$name-run.install
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue