Author: jajcus                       Date: Wed Aug 26 14:03:01 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new package

---- Files affected:
packages/Webilder:
   Webilder.spec (NONE -> 1.1)  (NEW), adapter (NONE -> 1.1)  (NEW), builder 
(NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/Webilder/Webilder.spec
diff -u /dev/null packages/Webilder/Webilder.spec:1.1
--- /dev/null   Wed Aug 26 16:03:02 2009
+++ packages/Webilder/Webilder.spec     Wed Aug 26 16:02:56 2009
@@ -0,0 +1,62 @@
+# $Revision$, $Date$
+Summary:       Flickr wallpaper downloader
+Name:          Webilder
+Version:       0.6.4
+Release:       0.1
+License:       GPL v2
+Group:         Applications/Graphics
+Source0:       
http://www.webilder.org/static/downloads/%{name}-%{version}.tar.gz
+# Source0-md5: 54ae36a6e050b7f4fffa7a62f8f2c44b
+URL:           http://www.webilder.org/
+BuildRequires: python-devel
+BuildRequires: python-gnome-desktop-applet
+BuildRequires: rpmbuild(macros) >= 1.219
+Requires:      python-modules
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Webilder delivers stunning wallpapers to your Linux desktop, directly from
+Flickr and Webshots. You choose what keywords (tags) to watch for, and photos
+are automatically downloaded to your computer. Webilder can also change the
+wallpaper every few minutes.
+
+%prep
+%setup -q
+
+%build
+export CFLAGS="%{rpmcflags}"
+%{__python} setup.py build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__python} setup.py install \
+       --optimize=2 \
+       --root=$RPM_BUILD_ROOT
+
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README AUTHORS
+%attr(755,root,root) %{_bindir}/*
+%{_libdir}/bonobo/servers/*.server
+%{_desktopdir}/*.desktop
+%{_pixmapsdir}/*.png
+%{py_sitescriptdir}/webilder
+%{py_sitescriptdir}/Webilder*.egg-info
+%{_datadir}/webilder
+
+%define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <[email protected]>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2009/08/26 14:02:56  jajcus
+- new package
+

================================================================
Index: packages/Webilder/adapter
diff -u /dev/null packages/Webilder/adapter:1.1
--- /dev/null   Wed Aug 26 16:03:02 2009
+++ packages/Webilder/adapter   Wed Aug 26 16:02:56 2009
@@ -0,0 +1,276 @@
+#!/bin/sh
+#
+# Authors:
+#      Michał Kuratczyk <[email protected]>
+#      Sebastian Zagrodzki <[email protected]>
+#      Tomasz Kłoczko <[email protected]>
+#      Artur Frysiak <[email protected]>
+#      Michal Kochanowicz <[email protected]>
+#      Elan Ruusamäe <[email protected]>
+#
+# See cvs log adapter{,.awk} for list of contributors
+#
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+RCSID='$Id$'
+r=${RCSID#* * }
+rev=${r%% *}
+VERSION="v0.31/$rev"
+VERSIONSTRING="\
+Adapter adapts .spec files for PLD Linux.
+$VERSION (C) 1999-2009 Free Penguins".
+
+PROGRAM=${0##*/}
+dir=$(d=$0; [ -L "$d" ] && d=$(readlink "$d"); dirname "$d")
+adapter=$dir/adapter.awk
+usage="Usage: $PROGRAM [FLAGS] SPECFILE
+
+-s|--no-sort|--skip-sort
+       skip BuildRequires, Requires sorting
+-m|--no-macros|--skip-macros
+       skip use_macros() substitutions
+-d|--skip-desc
+       skip desc wrapping
+-a|--skip-defattr
+       skip %defattr corrections
+-o
+       do not do any diffing, just dump the output
+"
+
+if [ ! -x /usr/bin/getopt ]; then
+       echo >&2 "You need to install util-linux to use adapter"
+       exit 1
+fi
+
+if [ ! -x /usr/bin/patch ]; then
+       echo >&2 "You need to install patch to use adapter"
+       exit 1
+fi
+
+t=$(getopt -o hsomdaV --long 
help,version,sort,sort-br,no-macros,skip-macros,skip-desc,skip-defattr -n 
"$PROGRAM" -- "$@") || exit $?
+eval set -- "$t"
+
+while true; do
+       case "$1" in
+       -h|--help)
+               echo 2>&1 "$usage"
+               exit 1
+       ;;
+       -s|--no-sort|--skip-sort)
+               export SKIP_SORTBR=1
+       ;;
+       -m|--no-macros|--skip-macros)
+               export SKIP_MACROS=1
+       ;;
+       -d|--skip-desc)
+               export SKIP_DESC=1
+       ;;
+       -a|--skip-defattr)
+               export SKIP_DEFATTR=1
+       ;;
+       -V|--version)
+               echo "$VERSIONSTRING"
+               exit 0
+               ;;
+       -o)
+               outputonly=1
+       ;;
+       --)
+               shift
+               break
+       ;;
+       *)
+               echo >&2 "$PROGRAM: Internal error: \`$1' not recognized!"
+               exit 1
+               ;;
+       esac
+       shift
+done
+
+diffcol()
+{
+        # vim like diff colourization
+        sed -e '
+        s,,^[,g;
+        s,,^G,g;
+        s,^\(Index:\|diff\|---\|+++\) .*$,&,;
+        s,^@@ ,&,g;
+        s,^-,&,;
+        s,^+,&,;
+        s,\r,^M,g;
+        s,     ,    ,g;
+        s,\([^[:space:]]\)\([[:space:]]\+\)$,\1\2,g;
+        s,$,,
+        ' "$@"
+}
+
+diff2hunks()
+{
+        # diff2hunks orignally by dig
+        perl -e '
+#! /usr/bin/perl -w
+
+use strict;
+
+for my $filename (@ARGV) {
+       my $counter = 1;
+       my $fh;
+       open $fh, "<", $filename or die "$filename: open for reading: $!";
+       my @lines = <$fh>;
+       my @hunks;
+       my @curheader;
+       for my $i (0 ... $#lines) {
+               next unless $lines[$i] =~ m/^...@\@ /;
+               if ($i >= 2 and $lines[$i - 2] =~ m/^--- / and $lines[$i - 1] 
=~ m/^\+\+\+ /) {
+                       @curheader = @lines[$i - 2 ... $i - 1];
+               }
+               next unless @curheader;
+               my $j = $i + 1;
+               while ($j < @lines and $lines[$j] !~ m/^...@\@ /) {$j++}
+               $j -= 2
+                       if $j >= 3 and $j < @lines
+                               and $lines[$j - 2] =~ m/^--- /
+                               and $lines[$j - 1] =~ m/^\+\+\+ /;
+               $j--;
+               $j-- until $lines[$j] =~ m/^[ @+-]/;
+               my $hunkfilename = $filename;
+               $hunkfilename =~ 
s/((\.(pat(ch)?|diff?))?)$/"-".sprintf("%03i",$counter++).$1/ei;
+               my $ofh;
+               open $ofh, ">", $hunkfilename or die "$hunkfilename: open for 
writing: $!";
+               print $ofh @curheader, @lines[$i ... $j];
+               close $ofh;
+       }
+}
+' "$@"
+}
+
+# import selected macros for adapter.awk
+# you should update the list also in adapter.awk when making changes here
+import_rpm_macros() {
+       macros="
+       _topdir
+       _prefix
+       _bindir
+       _sbindir
+       _libdir
+       _sysconfdir
+       _datadir
+       _includedir
+       _mandir
+       _infodir
+       _examplesdir
+       _defaultdocdir
+       _kdedocdir
+       _gtkdocdir
+       _desktopdir
+       _pixmapsdir
+       _javadir
+
+       perl_sitearch
+       perl_archlib
+       perl_privlib
+       perl_vendorlib
+       perl_vendorarch
+       perl_sitelib
+
+       py_sitescriptdir
+       py_sitedir
+       py_scriptdir
+       py_ver
+
+       ruby_archdir
+       ruby_ridir
+       ruby_rubylibdir
+       ruby_sitearchdir
+       ruby_sitelibdir
+       ruby_rdocdir
+
+       php_pear_dir
+       php_data_dir
+       tmpdir
+"
+       eval_expr=""
+       for macro in $macros; do
+               eval_expr="$eval_expr\nexport $macro='%{$macro}'"
+       done
+
+
+       # get cvsaddress for changelog section
+       # using rpm macros as too lazy to add ~/.adapterrc parsing support.
+       eval_expr="$eval_expr
+       export 
_cvsmaildomain='%{?_cvsmaildomain}%{!?_cvsmaildomain:@pld-linux.org}'
+       export _cvsmailfeedback='%{?_cvsmailfeedback}%{!?_cvsmailfeedback:PLD 
Team <[email protected]>}'
+       "
+
+       eval $(rpm --eval "$(echo -e $eval_expr)")
+}
+
+adapterize() {
+       local workdir
+       workdir=$(mktemp -d ${TMPDIR:-/tmp}/adapter-XXXXXX) || exit
+       awk=gawk
+
+       local tmp=$workdir/$(basename $SPECFILE) || exit
+
+       import_rpm_macros
+
+       LC_ALL=en_US.UTF-8 $awk -f $adapter $SPECFILE > $tmp || exit
+
+       if [ "$outputonly" = 1 ]; then
+               cat $tmp
+
+       elif [ "$(diff --brief $SPECFILE $tmp)" ]; then
+               diff -u $SPECFILE $tmp > $tmp.diff
+               if [ -t 1 ]; then
+                               diffcol $tmp.diff | less -r
+                               while : ; do
+                                       echo -n "Accept? (Yes, No, Confirm each 
chunk)? "
+                                       read ans
+                                       case "$ans" in
+                                       [yYoO]) # y0 mama
+                                               mv -f $tmp $SPECFILE
+                                               echo "Ok, adapterized."
+                                               break
+                                       ;;
+                                       [cC]) # confirm each chunk
+                                               diff2hunks $tmp.diff
+                                               for t in $(ls $tmp-*.diff); do
+                                                               diffcol $t | 
less -r
+                                                               echo -n 
"Accept? (Yes, [N]o, Quit)? "
+                                                               read ans
+                                                               case "$ans" in
+                                                               [yYoO]) # y0 
mama
+                                                                       patch < 
$t
+                                                                       ;;
+                                                               [Q]) # Abort
+                                                                       break
+                                                                       ;;
+                                                               esac
+                                               done
+                                               break
+                                       ;;
+                                       [QqnNsS])
+                                               echo "Ok, exiting."
+                                               break
+                                       ;;
+                                       esac
+                               done
+               else
+                               cat $tmp.diff
+               fi
+       else
+               echo "The SPEC is perfect ;)"
+       fi
+
+       rm -rf $workdir
+}
+
+SPECFILE="$1"
+[ -f "$SPECFILE" ] || SPECFILE="$(basename $SPECFILE .spec).spec"
+
+if [ $# -ne 1 -o ! -f "$SPECFILE" ]; then
+       echo "$usage"
+       exit 1
+fi
+
+adapterize

================================================================
Index: packages/Webilder/builder
diff -u /dev/null packages/Webilder/builder:1.1
--- /dev/null   Wed Aug 26 16:03:02 2009
+++ packages/Webilder/builder   Wed Aug 26 16:02:56 2009
@@ -0,0 +1,2497 @@
+#!/bin/ksh
+#
+# This program is free software, distributed under the terms of
+# the GNU General Public License Version 2.
+#
+# -----------
+# Exit codes:
+#        0 - succesful
+#        1 - help displayed
+#        2 - no spec file name in cmdl parameters
+#        3 - spec file not stored in repo
+#        4 - some source, patch or icon files not stored in repo
+#        5 - package build failed
+#        6 - spec file with errors
+#        7 - wrong source in /etc/poldek.conf
+#        8 - Failed installing buildrequirements and subrequirements
+#        9 - Requested tag already exist
+#       10 - Refused to build fractional release
+#      100 - Unknown error (should not happen)
+
+# Notes (todo/bugs):
+# - builder -u fetches current version first (well that's okay, how you 
compare versions if you have no old spec?)
+# - when Icon: field is present, -5 and -a5 doesn't work
+# - builder -R skips installing BR if spec is not present before builder 
invocation (need to run builder twice)
+# TODO:
+# - ability to do ./builder -bb foo.spec foo2.spec foo3.spec
+
+RCSID='$Id$'
+r=${RCSID#* * }
+rev=${r%% *}
+VERSION="v0.23/$rev"
+VERSIONSTRING="\
+Build package utility from PLD Linux CVS repository
+$VERSION (C) 1999-2009 Free Penguins".
+
+PATH="/bin:/usr/bin:/usr/sbin:/sbin:/usr/X11R6/bin"
+
+COMMAND="build"
+TARGET=""
+
+SPECFILE=""
+BE_VERBOSE=""
+QUIET=""
+CLEAN=""
+DEBUG=""
+NOURLS=""
+NOCVS=""
+NOCVSSPEC=""
+NODIST=""
+NOINIT=""
+PREFMIRRORS=""
+UPDATE=""
+ADD5=""
+NO5=""
+ALWAYS_CVSUP=${ALWAYS_CVSUP:-"yes"}
+CVSROOT=""
+GREEDSRC=""
+
+# use rpm 4.4.6+ digest format instead of comments if non-zero
+USEDIGEST=
+
+# user agent when fetching files
+USER_AGENT="PLD/Builder($VERSION)"
+
+# It can be used i.e. in log file naming.
+# See LOGFILE example.
+DATE=`date +%Y-%m-%d_%H-%M-%S`
+
+# Example: LOGFILE='../log.$PACKAGE_NAME'
+# Example: LOGFILE='../LOGS/log.$PACKAGE_NAME.$DATE'
+# Example: LOGFILE='$PACKAGE_NAME/$PACKAGE_NAME.$DATE.log'
+# Example: LOGFILE='$PACKAGE_NAME.$DATE.log'
+# Yes, you can use variable name! Note _single_ quotes!
+LOGFILE=''
+
+LOGDIR=""
+LOGDIROK=""
+LOGDIRFAIL=""
+LASTLOG_FILE=""
+
+CHMOD="no"
+CHMOD_MODE="0644"
+RPMOPTS=""
+RPMBUILDOPTS=""
+BCOND=""
+GROUP_BCONDS="no"
+
+# create symlinks for tools in PACKAGE_DIR, see get_spec()
+SYMLINK_TOOLS="yes"
+
+PATCHES=""
+SOURCES=""
+ICONS=""
+PACKAGE_RELEASE=""
+PACKAGE_VERSION=""
+PACKAGE_NAME=""
+ASSUMED_NAME=""
+PROTOCOL="ftp"
+WGET_RETRIES=${MAX_WGET_RETRIES:-0}
+
+CVS_COMMAND=${CVS_COMMAND:-cvs}
+CVS_FORCE=""
+CVSIGNORE_DF="yes"
+CVS_RETRIES=${MAX_CVS_RETRIES:-1000}
+CVS_SERVER="cvs.pld-linux.org"
+CVSTAG=""
+
+RES_FILE=""
+
+DISTFILES_SERVER="://distfiles.pld-linux.org"
+ATTICDISTFILES_SERVER="://attic-distfiles.pld-linux.org"
+
+DEF_NICE_LEVEL=19
+SCHEDTOOL="auto"
+
+FAIL_IF_NO_SOURCES="yes"
+
+# let get_files skip over files which are present to get those damn files 
fetched
+SKIP_EXISTING_FILES="no"
+
+TRY_UPGRADE=""
+# should the specfile be restored if upgrade failed?
+REVERT_BROKEN_UPGRADE="yes"
+
+if rpm --specsrpm 2>/dev/null; then
+       FETCH_BUILD_REQUIRES_RPMSPECSRPM="yes"
+       FETCH_BUILD_REQUIRES_RPMGETDEPS="no"
+else
+       FETCH_BUILD_REQUIRES_RPMSPECSRPM="no"
+       if [ -x /usr/bin/rpm-getdeps ]; then
+               FETCH_BUILD_REQUIRES_RPMGETDEPS="yes"
+       else
+               FETCH_BUILD_REQUIRES_RPMGETDEPS="no"
+       fi
+fi
+
+
+# Here we load saved user environment used to
+# predefine options set above, or passed to builder
+# in command line.
+# This one reads global system environment settings:
+if [ -f ~/etc/builderrc ]; then
+       . ~/etc/builderrc
+fi
+# And this one cascades settings using user personal
+# builder settings.
+# Example of ~/.builderrc:
+#
+#UPDATE_POLDEK_INDEXES="yes"
+#FETCH_BUILD_REQUIRES="yes"
+#REMOVE_BUILD_REQUIRES="force"
+#GROUP_BCONDS="yes"
+#LOGFILE='../LOGS/log.$PACKAGE_NAME.$DATE'
+#TITLECHANGE=no
+#
+SU_SUDO=""
+if [ -n "$HOME_ETC" ]; then
+       USER_CFG="$HOME_ETC/.builderrc"
+       BUILDER_MACROS="$HOME_ETC/.builder-rpmmacros"
+else
+       USER_CFG=~/.builderrc
+       BUILDER_MACROS=~/.builder-rpmmacros
+fi
+
+[ -f "$USER_CFG" ] && . "$USER_CFG"
+
+if [ "$SCHEDTOOL" = "auto" ]; then
+       if [ -x /usr/bin/schedtool ] && schedtool -B -e echo >/dev/null; then
+               SCHEDTOOL="schedtool -B -e"
+       else
+               SCHEDTOOL="no"
+       fi
+fi
+
+if [ -n "$USE_PROZILLA" ]; then
+       GETURI="proz --no-getch -r -P ./ -t$WGET_RETRIES $PROZILLA_OPTS"
+       GETURI2="$GETURI"
+       OUTFILEOPT="-O"
+elif [ -n "$USE_AXEL" ]; then
+       GETURI="axel -a $AXEL_OPTS"
+       GETURI2="$GETURI"
+       OUTFILEOPT="-o"
+else
+       wget --help 2>&1 | grep -q -- ' --no-check-certificate ' && 
WGET_OPTS="$WGET_OPTS --no-check-certificate"
+       wget --help 2>&1 | grep -q -- ' --inet ' && WGET_OPTS="$WGET_OPTS 
--inet"
+       wget --help 2>&1 | grep -q -- ' --retry-connrefused ' && 
WGET_OPTS="$WGET_OPTS --retry-connrefused"
+       WGET_OPTS="$WGET_OPTS --user-agent=$USER_AGENT"
+
+       GETURI="wget --passive-ftp -c -nd -t$WGET_RETRIES $WGET_OPTS"
+       GETURI2="wget -c -nd -t$WGET_RETRIES $WGET_OPTS"
+       OUTFILEOPT="-O"
+fi
+
+GETLOCAL="cp -a"
+
+if (rpm --version 2>&1 | grep -q '4.0.[0-2]'); then
+       RPM="rpm"
+       RPMBUILD="rpm"
+else
+       RPM="rpm"
+       RPMBUILD="rpmbuild"
+fi
+
+#
+# are we using cvs-nserver ?
+#
+CVS_NSERVER=0
+$CVS_COMMAND --version 2>&1 | grep -q 'CVS-nserver'
+[ $? -eq 0 ] && CVS_NSERVER=1
+
+POLDEK_INDEX_DIR="$($RPM --eval %_rpmdir)/"
+POLDEK_CMD="$SU_SUDO /usr/bin/poldek --noask"
+
+run_poldek() {
+       RES_FILE=$(mktemp -t builder.XXXXXX || ${TMPDIR:-/tmp}/builder.$RANDOM)
+       if [ -n "$LOGFILE" ]; then
+               LOG=`eval echo $LOGFILE`
+               if [ -n "$LASTLOG_FILE" ]; then
+                       echo "LASTLOG=$LOG" > $LASTLOG_FILE
+               fi
+               (${NICE_COMMAND} ${POLDEK_CMD} `while test $# -gt 0; do echo 
"$1 ";shift;done` ; echo $? > ${RES_FILE})|tee -a $LOG
+               return $exit_pldk
+       else
+               (${NICE_COMMAND} ${POLDEK_CMD} `while test $# -gt 0; do echo 
"$1 ";shift;done` ; echo $? > ${RES_FILE}) 1>&2 >/dev/null
+               return `cat ${RES_FILE}`
+               rm -rf ${RES_FILE}
+       fi
+}
+
+#---------------------------------------------
+# functions
+
+usage() {
+       if [ -n "$DEBUG" ]; then set -xv; fi
+       echo "\
+Usage: builder [-D|--debug] [-V|--version] [--short-version] [-a|--as_anon] 
[-b|-ba|--build]
+[-bb|--build-binary] [-bs|--build-source] [-bc] [-bi] [-bl] [-u|--try-upgrade]
+[{-cf|--cvs-force}] [{-B|--branch} <branch>] [{-d|--cvsroot} <cvsroot>]
+[-g|--get] [-h|--help] [--http] [{-l|--logtofile} <logfile>] [-m|--mr-proper]
+[-q|--quiet] [--date <yyyy-mm-dd> [-r <cvstag>] [{-T|--tag <cvstag>]
+[-Tvs|--tag-version-stable] [-Ts|--tag-stable] [-Tv|--tag-version]
<<Diff was trimmed, longer than 597 lines>>
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to