Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37704151
en ru br
Репозитории ALT

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

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

pax_global_header00006660000000000000000000000064122711103560014510gustar00rootroot0000000000000052 comment=20c4bac20a8fb7fb7efe605a0f8da5a5f5ff155a
rpm-build-gir-0.7.2/000075500000000000000000000000001227111035600141665ustar00rootroot00000000000000rpm-build-gir-0.7.2/.gear/000075500000000000000000000000001227111035600151625ustar00rootroot00000000000000rpm-build-gir-0.7.2/.gear/rules000064400000000000000000000000071227111035600162340ustar00rootroot00000000000000tar: .
rpm-build-gir-0.7.2/.gear/tags/000075500000000000000000000000001227111035600161205ustar00rootroot00000000000000rpm-build-gir-0.7.2/.gear/tags/list000064400000000000000000000000001227111035600170040ustar00rootroot00000000000000rpm-build-gir-0.7.2/gir-js.req000075500000000000000000000036441227111035600161040ustar00rootroot00000000000000#!/bin/sh -efu
#
# Copyright (C) 2010 Alexey Shabalin <shaba@altlinux.org>
#
# 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.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#

. /usr/lib/rpm/functions
. /usr/lib/rpm/rpm-build-gir.functions

JsReq()
{
local f="$1"; shift
out="$(cat "$f" | grep -o '.*= *imports\.gi\..*;$' | grep -o 'imports.gi.*' | sed -e 's/imports.gi.//' -e 's/versions.//' -e "s/'//" -e "s/'//" -e 's/"//' -e 's/"//' -e 's/;//' -e 's/;//')" ||
Fatal "failed to process $f"
[ -n "$out" ] || return 0
echo "$out" |while read -r line; do
set -- $line
case $# in
1 | 3 ) ;;
*) Fatal "$f: invalid output of parsed js file $line" ;;
esac
case "$1" in
*[!A-Za-z0-9_.+-]*)
Fatal "$f: invalid output of parsed js file: $line" ;;
[A-Za-z0-9_]*) ;;
*) Fatal "$f: invalid output of parsed js file: $line" ;;
esac
if [ $1 = Peas ]; then
echo "libpeas-js-loader"
fi
if [ $# = 1 ]; then
echo "typelib($1)"
continue
fi
case "$2" in
[\<\>=] | [\<\>]= ) ;;
*) Fatal "$f: invalid output of parsed js file: $line" ;;
esac
case "$3" in
*[!A-Za-z0-9_.+-]*)
Fatal "$f: invalid output of parsed js file: $line" ;;
[0-9]*) ;;
*) Fatal "$f: invalid output of parsed js file: $line" ;;
esac
echo "typelib($1) $2 $3"
done

}

ArgvFileAction JsReq "$@" | TypeLibReq_Skip --
rpm-build-gir-0.7.2/gir-js.req.files000075500000000000000000000007051227111035600172000ustar00rootroot00000000000000#!/bin/sh -efu

while IFS=$'\t' read -r f t; do
case "$f" in
*.js) ;;
*) continue ;;
esac
case "$t" in
*" text"*)
echo "$f" ;;
# file(1) check for text files is not quite reliable
# I use perl for '-T $f' heuristic check (see perlfunc for details)
*)
if perl -e '$f=shift; exit( -T $f ? 0 : 1 )' "$f"; then
echo "${0##*/}: $f: $t (PASS)" >&2
echo "$f"
else
echo "${0##*/}: $f: $t (IGNORE)" >&2
fi
;;
esac
done
rpm-build-gir-0.7.2/gir-python.req000075500000000000000000000032271227111035600170060ustar00rootroot00000000000000#!/bin/sh -efu
#
# Copyright (C) 2010 Alexey Shabalin <shaba@altlinux.org>
#
# 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.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#

. /usr/lib/rpm/functions
. /usr/lib/rpm/rpm-build-gir.functions
keyword=".*from[[:space:]]*gi.repository[[:space:]]*import"

PyGiReq()
{
local f="$1" out=; shift
out="$(cat "$f" | egrep -o "$keyword[[:space:]]*[A-Za-z0-9 ,]*" | sed -e '
s:'"$keyword"'\([A-Za-z ,]*\):\1:
s: as .*::
s:,: :g')" ||
Fatal "failed to process $f"
[ -n "$out" ] || return 0

for ref in $(echo "$out"); do
echo "$ref" |while read -r line; do
set -- $line
case $# in
1) ;;
*) Fatal "$f: invalid output of parsed python file $line" ;;
esac
case "$1" in
*[!A-Za-z0-9_.+-]*)
Fatal "$f: invalid output of parsed python file: $line" ;;
[A-Za-z0-9_]*) ;;
*) Fatal "$f: invalid output of parsed python file: $line" ;;
esac
if [ $1 = Peas ]; then
echo "libpeas-python-loader"
fi
echo "typelib($1)"
done
done

}

ArgvFileAction PyGiReq "$@" | TypeLibReq_Skip --
rpm-build-gir-0.7.2/gir-python.req.files000075500000000000000000000014711227111035600201060ustar00rootroot00000000000000#!/bin/sh -efu
while IFS=$'\t' read -r f t; do
case "$t" in
# shortcut for real python scripts
*"python script text"*)
echo "$f"
continue ;;
# symbolic links not needed here?
*"symbolic link to "*)
continue ;;
esac
case "$f" in
*.py) [ -f "$f" ] || continue ;;
*) continue ;;
esac
# the rest is to deal with *.py files
case "$f" in
# __init__.py can be empty - no need for filetype check
*/__init__.py)
echo "$f"
continue ;;
esac
case "$t" in
*" text"*)
echo "$f" ;;
# file(1) check for text files is not quite reliable
# I use perl for '-T $f' heuristic check (see perlfunc for details)
*)
if perl -e '$f=shift; exit( -T $f ? 0 : 1 )' "$f"; then
echo "${0##*/}: $f: $t (PASS)" >&2
echo "$f"
else
echo "${0##*/}: $f: $t (IGNORE)" >&2
fi
;;
esac
done
rpm-build-gir-0.7.2/gir.prov000075500000000000000000000020161227111035600156610ustar00rootroot00000000000000#!/bin/sh -efu
#
# Copyright (C) 2010 Alexey Shabalin <shaba@altlinux.org>
#
# 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.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#

. /usr/lib/rpm/functions
[ $# -eq 1 ] && [ -n "$1" -a -z "${1##/*}" ] ||
{ ArgvFileAction "$0" "$@"; exit; }

name="$(echo "${1##*/}" | cut --delimiter='-' -f 1 -)"
version="$(echo "${1##*/}" | sed "s/$name-//" | sed 's/.gir//')"
echo "gir($name) = $version"
rpm-build-gir-0.7.2/gir.prov.files000075500000000000000000000005041227111035600167620ustar00rootroot00000000000000#!/bin/sh -efu
[ -n "${RPM_GIRDIR-}" ] || RPM_GIRDIR=$RPM_DATADIR/gir-1.0

for dir in ${RPM_GIRDIR}; do
while IFS=$'\t' read -r f t; do
case "$f" in
${RPM_BUILD_ROOT-}$dir/*.gir) ;;
*) continue ;;
esac
case "$t" in
*'XML 1.0 document text'*) echo "$f" ;;
*) echo "${0##*/}: $f: $t" >&2 ;;
esac
done
done
rpm-build-gir-0.7.2/gir.req000075500000000000000000000031171227111035600154650ustar00rootroot00000000000000#!/bin/sh -efu
#
# Copyright (C) 2010 Alexey Shabalin <shaba@altlinux.org>
#
# 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.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#

. /usr/lib/rpm/functions

GirReq()
{
local f="$1"; shift
out="$(xmllint "$f" | grep -o '<include name.*/>' | sed -e 's/<include name="//' -e 's/" version="/ = /' -e 's/"\/>//')" ||
Fatal "failed to process $f"
[ -n "$out" ] || return 0
echo "$out" |while read -r line; do
set -- $line
case "$1" in
*[!A-Za-z0-9_.+-]*)
Fatal "$f: invalid output of parsed gir file: $line" ;;
[A-Za-z0-9_]*) ;;
*) Fatal "$f: invalid output of parsed gir file: $line" ;;
esac
case "$2" in
[\<\>=] | [\<\>]= ) ;;
*) Fatal "$f: invalid output of parsed gir file: $line" ;;
esac
case "$3" in
*[!A-Za-z0-9_.+-]*)
Fatal "$f: invalid output of parsed gir file: $line" ;;
[0-9]*) ;;
*) Fatal "$f: invalid output of parsed gir file: $line" ;;
esac
echo "gir($1) $2 $3"
done

}

ArgvFileAction GirReq "$@"
rpm-build-gir-0.7.2/rpm-build-gir.functions000075500000000000000000000022111227111035600205710ustar00rootroot00000000000000#!/bin/sh -e
#
# Copyright (C) 2013 Yuri N. Sedunov <aris@altlinux.org>
#
# 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.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#

. /usr/lib/rpm/functions

# filters out reqs like typelib(Foo) spawned in comments
TypeLibReq_Skip()
{
while read req; do
if [ -n "${RPM_TYPELIB_REQ_SKIPLIST-}" ]; then
for skip in $RPM_TYPELIB_REQ_SKIPLIST; do
if [ -z "${req##$skip}" ]; then
Debug "skipped $req due to RPM_TYPELIB_REQ_SKIPLIST pattern $skip"
continue 2
fi
done
fi
echo $req
done
}
rpm-build-gir-0.7.2/rpm-build-gir.macros000064400000000000000000000004641227111035600200520ustar00rootroot00000000000000%_girdir %_datadir/gir-1.0
%_typelibdir %_libdir/girepository-1.0
%set_typelibdir() %global _typelibdir %*
%set_girdir() %global _girdir %*
%add_typelibdir() %global _typelibdir %_typelibdir %*
%_typelib_req_skiplist %{nil}
%add_typelib_req_skiplist() %global _typelib_req_skiplist %_typelib_req_skiplist %*
rpm-build-gir-0.7.2/rpm-build-gir.spec000064400000000000000000000073021227111035600175160ustar00rootroot00000000000000Name: rpm-build-gir
Version: 0.7.2
Release: alt2

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

Source: %name-%version.tar

BuildArch: noarch
Requires: xml-utils

%description
These helper macros and dependency calculation utils facilitate creation of
RPM packages containing GObject Introspection files.

%prep
%setup

%install
mkdir -p %buildroot{%_rpmlibdir,%_rpmmacrosdir}
install -pD -m644 rpm-build-gir.macros %buildroot%_rpmmacrosdir/gobject-introspection
install -p -m755 typelib.env %buildroot%_rpmmacrosdir/typelib.env

for f in gir.req* gir.prov* typelib.req* typelib.prov* gir-js.req* gir-python.req* rpm-build-gir.functions; do
install -m755 -p "$f" "%buildroot%_rpmlibdir/$f"
done

ln -s typelib.prov.files %buildroot%_rpmlibdir/typelib.req.files
ln -s gir.prov.files %buildroot%_rpmlibdir/gir.req.files


%files
%_rpmmacrosdir/gobject-introspection
%_rpmmacrosdir/typelib.env
%_rpmlibdir/%name.functions
%_rpmlibdir/gir*
%_rpmlibdir/typelib*

%changelog
* Sun Jan 26 2014 Yuri N. Sedunov <aris@altlinux.org> 0.7.2-alt2
- modified gir-js.req using TypeLibReq_Skip() too

* Fri Mar 08 2013 Yuri N. Sedunov <aris@altlinux.org> 0.7.2-alt1
- rpm-build-gir.macros: added %%set_girdir macros
- typelib.env: exported RPM_GIRDIR variable
- modified gir.prov.files using RPM_GIRDIR variable

* Thu Jan 10 2013 Yuri N. Sedunov <aris@altlinux.org> 0.7.1-alt7.1
- typelib.req: fix related of previous release

* Wed Jan 09 2013 Yuri N. Sedunov <aris@altlinux.org> 0.7.1-alt7
- rpm-build-gir.macros: added %%add_typelib_req_skiplist macros
- typelib.env: exported RPM_TYPELIB_REQ_SKIPLIST variable
- rpm-build-gir.functions: implemented TypeLibReq_Skip()
- modified {gir-python,typelib}.req using TypeLibReq_Skip()

* Tue Jun 12 2012 Yuri N. Sedunov <aris@altlinux.org> 0.7.1-alt6
- rpm-build-gir.macros: added %%{set,add}_typelibdir macros
- exported RPM_TYPELIBDIR variable (new typelib.env file)
- modified typelib.prov.files and typelib.req using RPM_TYPELIBDIR variable

* Mon Oct 31 2011 Alexey Shabalin <shaba@altlinux.ru> 0.7.1-alt5
- find in first 50 lines of *.typelib

* Thu Oct 06 2011 Yuri N. Sedunov <aris@altlinux.org> 0.7.1-alt4
- another small fix in gir-python.req

* Thu Sep 15 2011 Yuri N. Sedunov <aris@altlinux.org> 0.7.1-alt3
- small fix in gir-python.req

* Wed Sep 14 2011 Alexey Shabalin <shaba@altlinux.ru> 0.7.1-alt2
- build to Sisyphus

* Sun Sep 04 2011 Yuri N. Sedunov <aris@altlinux.org> 0.7.1-alt1
- improved gir-python.req (ALT #25754)

* Tue Jun 14 2011 Alexey Shabalin <shaba@altlinux.ru> 0.7-alt1
- fixed gir-python.req - delete all after "as" (ALT #25754)

* Tue Jun 07 2011 Alexey Shabalin <shaba@altlinux.ru> 0.6-alt1
- another fixed gir-python.req

* Tue Apr 19 2011 Yuri N. Sedunov <aris@altlinux.org> 0.5-alt2
- fixed gir-python.req

* Fri Apr 08 2011 Alexey Shabalin <shaba@altlinux.ru> 0.5-alt1
- add gir autoreq for python files
- if find "imports.gi.Peas" in javascript files then need libpeas-js-loader
- if find "gi.repository import Peas" in python files then need libpeas-python-loader

* Wed Mar 09 2011 Alexey Shabalin <shaba@altlinux.ru> 0.4.2-alt1
- update filter for javascript files

* Fri Mar 04 2011 Alexey Tourbin <at@altlinux.ru> 0.4.1-alt1
- gir.prov.files: fixed gir files detection

* Mon Feb 14 2011 Alexey Shabalin <shaba@altlinux.ru> 0.4-alt1
- add autoreq for javascript files

* Mon Jul 19 2010 Alexey Shabalin <shaba@altlinux.ru> 0.3-alt1
- fix build gobject-introspection with changed soname

* Tue Mar 30 2010 Alexey Shabalin <shaba@altlinux.ru> 0.2-alt1
- change scheme req and prov for gir and typelib from gir(Foo-1.0) to gir(Foo) = 1.0

* Sun Mar 07 2010 Alexey Shabalin <shaba@altlinux.ru> 0.1-alt1
- Initial release
rpm-build-gir-0.7.2/typelib.env000075500000000000000000000002611227111035600163520ustar00rootroot00000000000000%{?_typelibdir:export RPM_TYPELIBDIR="%_typelibdir"}
%{?_typelib_req_skiplist:export RPM_TYPELIB_REQ_SKIPLIST="%_typelib_req_skiplist"}
%{?_girdir:export RPM_GIRDIR="%_girdir"}
rpm-build-gir-0.7.2/typelib.prov000075500000000000000000000020261227111035600165510ustar00rootroot00000000000000#!/bin/sh -efu
#
# Copyright (C) 2010 Alexey Shabalin <shaba@altlinux.org>
#
# 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.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#

. /usr/lib/rpm/functions
[ $# -eq 1 ] && [ -n "$1" -a -z "${1##/*}" ] ||
{ ArgvFileAction "$0" "$@"; exit; }

name="$(echo "${1##*/}" | cut --delimiter='-' -f 1 -)"
version="$(echo "${1##*/}" | sed "s/$name-//" | sed 's/.typelib//')"
echo "typelib($name) = $version"
rpm-build-gir-0.7.2/typelib.prov.files000075500000000000000000000006111227111035600176500ustar00rootroot00000000000000#!/bin/sh -efu

[ -n "${RPM_LIBDIR-}" ] || RPM_LIBDIR=`rpm --eval %_libdir`
[ -n "${RPM_TYPELIBDIR-}" ] || RPM_TYPELIBDIR=$RPM_LIBDIR/girepository-1.0

for dir in ${RPM_TYPELIBDIR}; do
while IFS=$'\t' read -r f t; do
case "$f" in
${RPM_BUILD_ROOT-}$dir/*.typelib) ;;
*) continue ;;
esac
case "$t" in
*' data'*) echo "$f" ;;
*) echo "${0##*/}: $f: $t" >&2 ;;
esac
done
done
rpm-build-gir-0.7.2/typelib.req000075500000000000000000000042251227111035600163550ustar00rootroot00000000000000#!/bin/sh -efu
#
# Copyright (C) 2010 Alexey Shabalin <shaba@altlinux.org>
#
# 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.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#

. /usr/lib/rpm/functions
. /usr/lib/rpm/rpm-build-gir.functions
[ -n "${RPM_LIBDIR-}" ] || RPM_LIBDIR=`rpm --eval %_libdir`
[ -n "${RPM_TYPELIBDIR-}" ] || RPM_TYPELIBDIR=$RPM_LIBDIR/girepository-1.0

TypeLibReq()
{
local f="$1"; shift

if [ -x "$RPM_BUILD_ROOT/usr/bin/g-ir-generate" ]; then
export LD_LIBRARY_PATH="$RPM_BUILD_ROOT$RPM_LIBDIR"
GIR_GEN="$RPM_BUILD_ROOT/usr/bin/g-ir-generate"
else
GIR_GEN="g-ir-generate"
fi
$GIR_GEN --includedir=$RPM_BUILD_ROOT$RPM_TYPELIBDIR "$f" | head -n 50 >/dev/null 2>&1 || Fatal "failed parse of $f"
out="$($GIR_GEN --includedir=$RPM_BUILD_ROOT$RPM_TYPELIBDIR "$f" | head -n 50 | grep -o '<include name.*/>' | sed -e 's/<include name="//' -e 's/" version="/ = /' -e 's/"\/>//')" ||
Fatal "failed to process $f"
[ -n "$out" ] || return 0
echo "$out" |while read -r line; do
set -- $line
case "$1" in
*[!A-Za-z0-9_.+-]*)
Fatal "$f: invalid output of parsed gir file: $line" ;;
[A-Za-z0-9_]*) ;;
*) Fatal "$f: invalid output of parsed gir file: $line" ;;
esac
case "$2" in
[\<\>=] | [\<\>]= ) ;;
*) Fatal "$f: invalid output of parsed gir file: $line" ;;
esac
case "$3" in
*[!A-Za-z0-9_.+-]*)
Fatal "$f: invalid output of parsed gir file: $line" ;;
[0-9]*) ;;
*) Fatal "$f: invalid output of parsed gir file: $line" ;;
esac
echo "typelib($1) $2 $3"
done

}

ArgvFileAction TypeLibReq "$@" | TypeLibReq_Skip --

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin