CVSTAG = r$(subst .,-,$(VERSION))
SONAME = @SONAME@
+PYTHONVERS = $(shell ls -d /usr/include/python* | sed "s|/usr/include/||g")
+
WHIPTCLSO=
#WHIPTCLSO=whiptcl.so
libdir = $(prefix)/lib
bindir = $(prefix)/bin
ARCHNAME = $(shell uname -m | sed 's/i.86/i386/')
-pythondir = $(prefix)/lib/python2.2
-pythonbindir = $(prefix)/lib/python2.2/lib-dynload
#--------------------------------------
testtree: testtree.o $(LIBNEWT)
gcc -g -o testtree testtree.o $(LIBNEWT) $(LIBS)
-_snackmodule.so: snackmodule.o $(LIBNEWTSH)
- gcc --shared $(SHCFLAGS) -o _snackmodule.so snackmodule.o -L . $(LIBNEWTSH)
-
-snackmodule.o: snackmodule.c
- gcc -I/usr/include/python2.2 -fPIC $(CFLAGS) -c snackmodule.c
+_snackmodule.so: snackmodule.c $(LIBNEWTSH)
+ for ver in $(PYTHONVERS) ; do \
+ if [ ! -f "$$ver/_snackmodule.so" -o $(LIBNEWTSH) -nt "$$ver/_snackmodule.so" ]; then \
+ mkdir -p $$ver ;\
+ gcc $(CFLAGS) -I/usr/include/$$ver -fPIC -c -o $$ver/snackmodule.o snackmodule.c ;\
+ gcc --shared $(SHCFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L . $(LIBNEWTSH) ;\
+ fi ; \
+ done
whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
gcc -g -o whiptail $(NDIALOGOBJS) -L . $(LIBNEWTSH) $(LIBS) -lpopt
[ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir)
install -s -m 755 $(LIBNEWTSH) $(instroot)/$(libdir)
ln -sf $(LIBNEWTSH) $(instroot)/$(libdir)/libnewt.so
- [ -n "$(WHIPTCLSO)" ] && install -s -m 755 whiptcl.so $(instroot)/$(libdir)
- [ -d $(instroot)/$(pythonbindir) ] || install -m 755 -d $(instroot)/$(pythonbindir)
- install -s -m 755 _snackmodule.so $(instroot)/$(pythonbindir)
- install -m 755 snack.py $(instroot)/$(pythondir)
+ [ -n "$(WHIPTCLSO)" ] && install -s -m 755 whiptcl.so $(instroot)/$(libdir) || :
+ for ver in $(PYTHONVERS) ; do \
+ [ -d $(instroot)/$(libdir)/$$ver/site-packages ] || install -m 755 -d $(instroot)/$(libdir)/$$ver/site-packages ;\
+ install -s -m 755 $$ver/_snackmodule.so $(instroot)/$(libdir)/$$ver/site-packages ;\
+ install -m 755 snack.py $(instroot)/$(libdir)/$$ver/site-packages ;\
+ done
configure: configure.in
autoconf
Summary: A development library for text mode user interfaces.
Name: newt
-%define version 0.50.34
+%define version 0.50.35
Version: %{version}
Release: 1
License: LGPL
%doc CHANGES COPYING
/usr/lib/libnewt.so.*
/usr/bin/whiptail
-/usr/lib/python2.2/snack.py*
-/usr/lib/python2.2/lib-dynload/_snackmodule.so
+/usr/lib/python*/site-packages/*
%files devel
%defattr (-,root,root)
/usr/lib/libnewt.so
%changelog
+* Mon Mar 18 2002 Bill Nottingham <notting@redhat.com> 0.50.35-1
+- build for whatever version of python happens to be installed
+
* Fri Sep 15 2001 Trond Eivind Glomsrød <teg@redhat.com> 0.50.34-1
- remove python2 subpackage
- compile package for python 2.2