Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37766990
en ru br
Репозитории ALT
S:2.1.0-alt1
5.1: 1.3.2-alt2
4.1: 1.3.2-alt1
4.0: 1.0-alt6
www.altlinux.org/Changes

Группа :: Разработка/Прочее
Пакет: rpm-build-mono

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

pax_global_header00006660000000000000000000000064111125124170014505gustar00rootroot0000000000000052 comment=57d3b2ccf551246e288a81d790751907e5f7f24d
rpm-build-mono-1.3.2/000075500000000000000000000000001111251241700143475ustar00rootroot00000000000000rpm-build-mono-1.3.2/.gear-rules000064400000000000000000000000071111251241700164130ustar00rootroot00000000000000tar: .
rpm-build-mono-1.3.2/mono.prov.files000075500000000000000000000004611111251241700173340ustar00rootroot00000000000000#!/bin/sh -efu

# %_monodir
MONO_LIBDIR=/usr/lib/mono

while IFS=$'\t' read -r f t; do
case "$t" in
*"Mono/.Net assembly"*) ;;
*) continue ;;
esac
case "$f" in
${RPM_BUILD_ROOT-}$MONO_LIBDIR/gac/*.dll) ;;
${RPM_BUILD_ROOT-}$MONO_LIBDIR/*/mscorlib.dll) ;;
*) continue ;;
esac
echo "$f"
done
rpm-build-mono-1.3.2/mono.req000075500000000000000000000155651111251241700160470ustar00rootroot00000000000000#!/bin/sh -efu
#
# Copyright (C) 2005 Ben Maurer <bmaurer@ximian.com>, Novell Inc.
# Copyright (C) 2007,2008 Alexey Tourbin <at@altlinux.org>, ALT Linux Team.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

. /usr/lib/rpm/functions

# %_monodir
MONO_LIBDIR=/usr/lib/mono

mono_private_libdirs=
if [ -n "${RPM_BUILD_ROOT-}" ]; then
export MONO_PATH=$RPM_BUILD_ROOT$MONO_LIBDIR:$RPM_BUILD_ROOT${MONO_LIBDIR%/*}
mono_private_libdirs=$(find "$RPM_BUILD_ROOT" \
-not -wholename "$RPM_BUILD_ROOT$MONO_LIBDIR/*" \
-type f '(' -name '*.dll' -o -name '*.exe' ')' -printf '%h\n')
if [ -n "$mono_private_libdirs" ]; then
mono_private_libdirs=$(echo "$mono_private_libdirs" | sort -u |
awk '{print length($0) "\t" $0}' |sort -n |cut -f2-)
mono_private_libdirs=$(echo $mono_private_libdirs |tr -s ' ' ':')
Debug "mono_private_libdirs=$mono_private_libdirs"
fi
fi

Monodis1()
{
# any number of options is okay, but only one file at a time
local f; f=$(shift $(($#-1)); echo "$1")
# stop shell.req from resolving monodis depedency --
# we use explicit dependency on /usr/bin/monodis in specfile
local monodis=monodis
if [ -n "${RPM_BUILD_ROOT-}" ]; then
case "$f" in
"$RPM_BUILD_ROOT$MONO_LIBDIR"/*)
# public code must not depend on private code.
# MONO_PATH is already set up.
;;
*)
# private code may depend on another private code.
# MONO_PATH is extended with $mono_private_libdirs.
if [ -n "$mono_private_libdirs" ]; then
local MONO_PATH="$MONO_PATH:$mono_private_libdirs"
export MONO_PATH
fi
;;
esac
if [ -x "$RPM_BUILD_ROOT/usr/bin/monodis" ]; then
[ -n "${RPM_LIBDIR-}" ] || RPM_LIBDIR=`rpm --eval %_libdir`
local LD_LIBRARY_PATH="$RPM_BUILD_ROOT$RPM_LIBDIR"
export LD_LIBRARY_PATH
monodis=$RPM_BUILD_ROOT/usr/bin/monodis
fi
fi
local out
if ! out=$("$monodis" "$@"); then
# monodis prints errors to stdout (#14578)
[ -z "$out" ] || echo "$out" >&2
Fatal "$f: $monodis failed"
fi
echo "$out"
}

MonoConfigFile()
{
local conf=/etc/mono/config
[ -n "${RPM_BUILD_ROOT-}" ] && [ -f "$RPM_BUILD_ROOT$conf" ] &&
echo "$RPM_BUILD_ROOT$conf" ||
echo "$conf"
}

MonoLibReq()
{
local f="$1" out=; shift
out=$(Monodis1 --moduleref "$f")
local refs=
refs=$(echo "$out" |sed -n 's/^[1-9][0-9]*: *//p')

[ -n "${RPM_LIB-}" ] || RPM_LIB=`rpm --eval %_lib`
local suffix; [ "$RPM_LIB" = lib64 ] && suffix='()(64bit)' || suffix=

local ref
for ref in $refs; do
local soname="$(fgrep "dll=\"$ref\"" "$f".config "$(MonoConfigFile)" 2>/dev/null |
sed -n 's/.*target="\(lib[^"]*[.]so[.][^"]*\|lib[^"]*[0-9][.]so\)".*/\1/p' |head -1)"
if [ -n "$soname" ]; then
Verbose "$f: $ref -> $soname"
[ "${RPM_TARGET_ARCH-}" != noarch ] &&
echo "$soname$suffix" ||
Fatal "$f: noarch package has soname dependency $soname"
elif [ -z "${ref##lib*.so.*}" -o -z "${ref##lib*[0-9].so}" ]; then
soname=$ref
Verbose "$f: $ref = $soname"
[ "${RPM_TARGET_ARCH-}" != noarch ] &&
echo "$soname$suffix" ||
Fatal "$f: noarch package has soname dependency $soname"
else
Info "$f: cannot resolve module reference $ref"
fi
done
}

# from mono-1.2.5.1/mono/metadata/assembly.c
stdlibs='Accessibility
Commons.Xml.Relaxng
I18N
I18N.CJK
I18N.MidEast
I18N.Other
I18N.Rare
I18N.West
Microsoft.VisualBasic
Microsoft.VisualC
Mono.Cairo
Mono.CompilerServices.SymbolWriter
Mono.Data
Mono.Data.SybaseClient
Mono.Data.Tds
Mono.Data.TdsClient
Mono.GetOptions
Mono.Http
Mono.Posix
Mono.Security
Mono.Security.Win32
Mono.Xml.Ext
Novell.Directory.Ldap
Npgsql
PEAPI
System
System.Configuration.Install
System.Data
System.Data.OracleClient
System.Data.SqlXml
System.Design
System.DirectoryServices
System.Drawing
System.Drawing.Design
System.EnterpriseServices
System.Management
System.Messaging
System.Runtime.Remoting
System.Runtime.Serialization.Formatters.Soap
System.Security
System.ServiceProcess
System.Web
System.Web.Mobile
System.Web.Services
System.Windows.Forms
System.Xml
mscorlib'
# The above list of libraries is treated specially by mono --
# versioned dependencies on these libraries are remapped to
# another (available) versions. Therefore, we use simplified
# 2-digit versioning for the standard libraries.

MonoReq()
{
local f="$1" out=; shift
out=$(Monodis1 --assemblyref "$f")
out=$(echo "$out" |awk -v stdlibs_str="$stdlibs" '
BEGIN {
n = split(stdlibs_str, ary, "\n")
for (i = 1; i <= n; i++) {
lib = ary[i]
stdlibs[lib] = i
}
START=0; LIBNAME=""; VERSION="";
}
(START==0) && /^[0-9]+: Version=/ {
START=1;
sub(/Version=/, "", $2);
VERSION=$2
}
(START==1) && /^\tName=/ {
sub(/Name=/, "", $1);
LIBNAME=$1
if (LIBNAME in stdlibs) {
split(VERSION, ary, ".")
VERSION = ary[1] "." ary[2]
}
print LIBNAME "\t" VERSION
START=0
}')
[ -n "$out" ] || return 0
local lib ver
case "$f" in
"${RPM_BUILD_ROOT-}$MONO_LIBDIR"/*)
# shortcut for public code that must not depend on private code.
echo "$out" |
while read -r lib ver; do
echo "mono($lib) = $ver"
done
return 0
;;
esac
# private code may depend on another private code --
# we emit file-level dependencies in this case.
local libdir
echo "$out" |
while read -r lib ver; do
for libdir in $(IFS="$IFS:"; echo $mono_private_libdirs); do
if [ -f "$libdir/$lib.dll" -o -L "$libdir/$lib.dll" ]; then
echo "${libdir#$RPM_BUILD_ROOT}/$lib.dll"
continue 2
elif [ -f "$libdir/$lib.exe" -o -L "$libdir/$lib.exe" ]; then
echo "${libdir#$RPM_BUILD_ROOT}/$lib.exe"
continue 2
fi
done
echo "mono($lib) = $ver"
done
}

# Note that mono.req and mono.prov are invoked with different
# set of files: mono.req processes all *.exe and *.dll files,
# but mono.prov does only public *.dll files under $MONO_LIBDIR.

MonoProv()
{
local f="$1" out=; shift
out=$(Monodis1 --assembly "$f")
echo "$out" |awk -v stdlibs_str="$stdlibs" '
BEGIN {
n = split(stdlibs_str, ary, "\n")
for (i = 1; i <= n; i++) {
lib = ary[i]
stdlibs[lib] = i
}
LIBNAME=""; VERSION="";
}
/^Version:/ { VERSION=$2 }
/^Name:/ { LIBNAME=$2 }
END {
if (LIBNAME ~ /^policy[.][0-9]+[.][0-9]+[.]/) {
cnt = split(LIBNAME, toks, ".")
VERSION=toks[2] "." toks[3] ".0.0"
LIBNAME=""
for (i=4; i<= cnt; i++)
LIBNAME = (LIBNAME toks[i] ".")
LIBNAME=substr(LIBNAME, 1, length(LIBNAME)-1)
}
if (VERSION && LIBNAME)
print "mono(" LIBNAME ") = " VERSION
if (VERSION && (LIBNAME in stdlibs)) {
split(VERSION, ary, ".")
VERSION = ary[1] "." ary[2]
print "mono(" LIBNAME ") = " VERSION
}
}'
}

case "${0##*/}" in
mono.req*) ArgvFileAction MonoReq "$@" ;;
mono.prov*) ArgvFileAction MonoProv "$@" ;;
monolib.req*) ArgvFileAction MonoLibReq "$@" ;;
*) Fatal "req/prov method not recognized" ;;
esac
rpm-build-mono-1.3.2/mono.req.files000075500000000000000000000001601111251241700171310ustar00rootroot00000000000000#!/bin/sh -efu

while IFS=$'\t' read -r f t; do
case "$t" in
*"Mono/.Net assembly"*)
echo "$f"
esac
done
rpm-build-mono-1.3.2/rpm-build-mono.macros000064400000000000000000000001361111251241700204160ustar00rootroot00000000000000%_monodir %_prefix/lib/mono
%_monogacdir %_monodir/gac
%_monodocdir %_datadir/monodoc/sources
rpm-build-mono-1.3.2/rpm-build-mono.spec000064400000000000000000000053341111251241700200710ustar00rootroot00000000000000Name: rpm-build-mono
Version: 1.3.2
Release: alt2

Summary: RPM helper macros and dependency utils to build Mono packages
License: GPL
Group: Development/Other

Source: %name-%version.tar

BuildArch: noarch

BuildPreReq: rpm >= 4.0.4-alt96.13
Requires: /usr/bin/monodis

%description
These helper macros and dependency calculation utils facilitate creation of
RPM packages containing Mono bytecode archives etc.

%prep
%setup

%install
install -pD -m644 rpm-build-mono.macros %buildroot%_rpmmacrosdir/mono
install -pD -m755 mono.req %buildroot%_rpmlibdir/mono.req
ln -s mono.req %buildroot%_rpmlibdir/monolib.req
ln -s mono.req %buildroot%_rpmlibdir/mono.prov
install -pD -m755 mono.req.files %buildroot%_rpmlibdir/mono.req.files
ln -s mono.req.files %buildroot%_rpmlibdir/monolib.req.files
install -pD -m755 mono.prov.files %buildroot%_rpmlibdir/mono.prov.files

%files
%_rpmmacrosdir/mono
%_rpmlibdir/mono*

%changelog
* Mon Nov 24 2008 Alexey Shabalin <shaba@altlinux.ru> 1.3.2-alt2
- define %%_monodocdir as /usr/share/monodoc/sources
- install mono macros to /usr/lib/rpm/macros.d

* Sun Mar 09 2008 Alexey Tourbin <at@altlinux.ru> 1.3.2-alt1
- trap errors which monodis(1) prints to stdout (#14578)

* Mon Jan 14 2008 Alexey Tourbin <at@altlinux.ru> 1.3.1-alt1
- monolib.req: added check to prevent soname dependencies in noarch packages

* Mon Dec 03 2007 Alexey Tourbin <at@altlinux.ru> 1.3-alt1
- reworked self-requires elimination algorithm, to allow dependencies
on private libraries between subpackages; now we emit file-level
dependencies for private libraries, e.g. /usr/lib/beagle/Beagle.dll

* Sun Nov 25 2007 Alexey Tourbin <at@altlinux.ru> 1.2-alt2
- rebuild for new dependencies on rpm

* Mon Nov 05 2007 Alexey Tourbin <at@altlinux.ru> 1.2-alt1
- monolib.req: improved soname detection
- mono.prov: provide only "public" DLLs under /usr/lib/mono/gac
- mono.req: implemented self-requires elimination, to allow private DLLs
- mono.req: use simplified 2-digit versioning for standard DLLs

* Mon Sep 24 2007 Alexey Tourbin <at@altlinux.ru> 1.1-alt1
- adapted mono.req and mono.prov scripts for new rpm-build
- monolib.req: extract soname dependencies from *.dll.config files

* Wed Nov 08 2006 Ildar Mulyukov <ildar@altlinux.ru> 1.0-alt6
- one more small error, will it work atlast?

* Tue Oct 31 2006 Ildar Mulyukov <ildar@altlinux.ru> 1.0-alt5
- fix a small error from previous release

* Tue Oct 31 2006 Ildar Mulyukov <ildar@altlinux.ru> 1.0-alt4
- fix for x86_64 arch

* Tue Oct 10 2006 Ildar Mulyukov <ildar@altlinux.ru> 1.0-alt3
- added %%_monodocdir to rpm-build-mono.macros

* Mon Oct 09 2006 Ildar Mulyukov <ildar@altlinux.ru> 1.0-alt2
- fixed rpm-build-mono.macros

* Thu Oct 05 2006 Ildar Mulyukov <ildar@altlinux.ru> 1.0-alt1
- Initial release
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin