diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..81e5d74 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +xteddy-2.0.1.tar.gz diff --git a/Makefile b/Makefile deleted file mode 100644 index ee1a29d..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: xteddy -# $Id$ -NAME := xteddy -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/sources b/sources index e69de29..88f18a8 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +d33bfe05f18259a3f7fd17ae256c5644 xteddy-2.0.1.tar.gz diff --git a/xteddy-2.0.1-visual.patch b/xteddy-2.0.1-visual.patch new file mode 100644 index 0000000..e117d9d --- /dev/null +++ b/xteddy-2.0.1-visual.patch @@ -0,0 +1,32 @@ +Imlib picks visual with highest possible depth, which are ARGB visuals in +case Composite extensions are in use, and which it can not handle. Use the +default, RGB, instead. + +Lubomir Rintel + +diff -up xteddy-2.0.1/xteddy.c.visual xteddy-2.0.1/xteddy.c +--- xteddy-2.0.1/xteddy.c.visual 2008-12-04 12:30:18.000000000 +0100 ++++ xteddy-2.0.1/xteddy.c 2008-12-04 12:30:21.000000000 +0100 +@@ -122,6 +122,8 @@ int main(int argc, char **argv) + Cursor cursor; + char *teddy; + char *file; ++ ImlibInitParams params; ++ Visual *visual; + + /* Window movement variables */ + XWindowChanges winchanges; +@@ -172,7 +174,12 @@ int main(int argc, char **argv) + display_width = DisplayWidth(display, screen_num); + display_height = DisplayHeight(display, screen_num); + +- if ( !(id=Imlib_init(display)) ) return -1; ++ /* Determine the correct visual */ ++ visual = DefaultVisual(display, screen_num); ++ params.flags = PARAMS_VISUALID; ++ params.visualid = visual->visualid; ++ ++ if ( !(id=Imlib_init_with_params(display, ¶ms)) ) return -1; + if ( !(file = InitTeddy(teddy)) ) { + fprintf(stderr, "Can not find any image with name %s.\n", teddy); + return -1; diff --git a/xteddy.spec b/xteddy.spec new file mode 100644 index 0000000..6a9784f --- /dev/null +++ b/xteddy.spec @@ -0,0 +1,57 @@ +Name: xteddy +Version: 2.0.1 +Release: 2%{?dist} +Summary: Tool to sit around silently, look cute, and make you smile + +Group: Amusements/Games +License: GPL+ +URL: http://webstaff.itn.liu.se/~stegu/xteddy/ +Source0: http://webstaff.itn.liu.se/~stegu/xteddy/%{name}-%{version}.tar.gz +# Aleady submitted upstream by mail +Patch0: xteddy-2.0.1-visual.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: imlib-devel libpng-devel + +%description +Xteddy is your virtual comfort when things get rough. It can do everything +a real teddy bear can do. That is, I can sit around silently, look cute, +and make you smile. + + +%prep +%setup -q +%patch0 -p1 -b .visual + + +%build +%configure +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%{_bindir}/xteddy +%{_bindir}/xteddy_test +%{_bindir}/xtoys +%{_mandir}/man1/xteddy.1* +%{_datadir}/xteddy +%doc COPYING README AUTHORS ChangeLog NEWS +%doc xteddy.README xtuxxy.credit + + +%changelog +* Sat Dec 06 2008 Lubomir Rintel 2.0.1-2 +- Own /usr/share/xteddy (thanks to Ralf Corsepius) + +* Thu Dec 04 2008 Lubomir Rintel 2.0.1-1 +- Initial packaging