%global twutils_version 0.2 %global xmms_twin_version 0.0.1 Name: twin Version: 0.6.1 Release: 4%{?dist} Summary: Textmode window environment for Linux Group: User Interface/Desktops License: GPLv2+ and LGPLv2+ and MIT and Public Domain and BSD URL: http://linuz.sns.it/~max/twin Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Source1: http://downloads.sourceforge.net/%{name}/twutils-%{twutils_version}.tar.gz Source2: http://downloads.sourceforge.net/%{name}/xmms-%{name}-%{xmms_twin_version}.tar.gz Source3: LICENSING.INFO Patch0: %{name}-gcc43.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gpm-devel BuildRequires: gtk2-devel BuildRequires: gtk+-devel BuildRequires: libtermcap-devel BuildRequires: libXpm-devel BuildRequires: xmms-devel %description Twin is a text-mode windowing environment: it draws and manages text windows on a text-mode display, like X11 does for graphical windows. It has a built-in window manager and terminal emulator, and can be used as server for remote clients in the same style as X11. It can display on Linux console, on X11 and inside itself. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel This package contains development files for %{name}. %package -n twutils Summary: Utilities for the Twin window environment Group: User Interface/Desktops Requires: %{name} = %{version}-%{release} %description -n twutils This package contains utilities for the Twin window environment, currently only Twkalc, a Kcalc-like calculator for Twin. %package -n xmms-twin Summary: Xmms applet for twin Group: Applications/Multimedia Requires: %{name} = %{version}-%{release} %description -n xmms-twin This package contains the Xmms applet for the Twin window environment. %prep %setup -q %setup -q -T -D -a 1 %setup -q -T -D -a 2 %patch0 install -p -m 644 %{SOURCE3} %{_builddir}/%{name}-%{version} # fix encoding iconv -f ISO88591 -t UTF8 < Changelog.txt > Changelog.txt.utf8 touch -r Changelog.txt Changelog.txt.utf8 mv Changelog.txt.utf8 Changelog.txt iconv -f ISO88591 -t UTF8 < docs/Tutorial > docs/Tutorial.utf8 touch -r docs/Tutorial docs/Tutorial.utf8 mv docs/Tutorial.utf8 docs/Tutorial iconv -f ISO88591 -t UTF8 < clients/setroot.sample > clients/setroot.sample.utf8 touch -r clients/setroot.sample clients/setroot.sample.utf8 mv clients/setroot.sample.utf8 clients/setroot.sample iconv -f ISO88591 -t UTF8 < clients/README.twsetroot > clients/README.twsetroot.utf8 touch -r clients/README.twsetroot clients/README.twsetroot.utf8 mv clients/README.twsetroot.utf8 clients/README.twsetroot # don't build with -fomit-frame-pointer sed -i 's/CC_FLAGS_OPT="$CC_FLAG_O2 $CC_FLAG_fomit_frame_pointer $CC_FLAG_fno_strict_aliasing"//' configure # don't strip and preserve timestamps sed -i -e 's/INSTALLFLAGS+=-s//' -e 's/LDFLAGS+=-s//' -e 's/INSTALL-TXT=$(INSTALL-BIN) -m 644/INSTALL-TXT=$(INSTALL-BIN) -m 644 -p/' makerules.in # preserve timestamps sed -i 's/$(INSTALL-BIN) $(T)system.twenvrc.sh/$(INSTALL) $(T)system.twenvrc.sh/' Makefile.sub %build %configure --enable-hw-tty-linux --enable-hw-tty --enable-hw-tty-twterm --enable-hw-tty-termcap --enable-term --enable-term-devpts --enable-tt --enable-tt-hw-gtk --enable-hw-ggi INSTALL="/usr/bin/install -p" make # parallel build doesn't work (sometimes:) # build twutils pushd twutils-%{twutils_version} sed -i -e 's|Tw/Tw.h|../include/Tw/Tw.h|' -e 's|Tw/Tw++.h|../include/Tw/Tw++.h|' configure export CFLAGS="$CFLAGS -I../include -I../../include -L../libs/libTw -L../../libs/libTw" export CXXFLAGS="$CXXFLAGS -I../include -I../../include -L../libs/libTw -L../../libs/libTw" %configure make popd # build xmms-twin pushd xmms-twin-%{xmms_twin_version} sed -i -e 's|Tw/Tw.h|../include/Tw/Tw.h|' -e 's|Tw/Tw++.h|../include/Tw/Tw++.h|' configure export CFLAGS="$CFLAGS -I../include -I../../include -L../libs/libTw -L../../libs/libTw" export CXXFLAGS="$CXXFLAGS -I../include -I../../include -L../libs/libTw -L../../libs/libTw" %configure sed -i 's/COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)/COMPILE = $(CC) $(LIBS) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)/' xmms-twin/Makefile make popd %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT make -C twutils-%{twutils_version} install DESTDIR=$RPM_BUILD_ROOT make -C xmms-twin-%{xmms_twin_version} install DESTDIR=$RPM_BUILD_ROOT rm $RPM_BUILD_ROOT%{_libdir}/*.a rm $RPM_BUILD_ROOT%{_libdir}/twin/.t* rm -rf $RPM_BUILD_ROOT%{_datadir}/twin/docs %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc COPYING COPYING.LIB Changelog.txt README clients/README.twsetroot clients/setroot.sample docs/diagram.txt docs/FAQ LICENSING.INFO %{_bindir}/* %exclude %{_bindir}/twkalc %exclude %{_bindir}/xmms-twin %{_sbindir}/* %{_libdir}/libTutf.so.* %{_libdir}/libTw.so.* %{_libdir}/libTT.so.* %{_libdir}/twin/ %{_libdir}/TT/ %{_mandir}/man1/twin.1.gz %{_datadir}/twin/ %files devel %defattr(-,root,root,-) %doc README.porting docs/Configure docs/Tutorial docs/libTw.txt docs/ltrace.conf %{_includedir}/Tutf/ %{_includedir}/Tw/ %{_includedir}/TT/ %{_libdir}/libTutf.so %{_libdir}/libTw.so %{_libdir}/libTT.so %files -n twutils %defattr(-,root,root,-) %doc twutils-%{twutils_version}/COPYING twutils-%{twutils_version}/COPYING.LIB twutils-%{twutils_version}/AUTHORS twutils-%{twutils_version}/ChangeLog %{_bindir}/twkalc %files -n xmms-twin %defattr(-,root,root,-) %doc xmms-twin-%{xmms_twin_version}/COPYING xmms-twin-%{xmms_twin_version}/ChangeLog %{_bindir}/xmms-twin %changelog * Sun Mar 08 2009 Milos Jakubicek - 0.6.1-4 - Added twutils and xmms-twin * Tue Feb 24 2009 Milos Jakubicek - 0.6.1-3 - Fixed changelog typo - Added BR: libXpm-devel - Changed Source URL to SourceForge.net on upstream's demand * Fri Feb 20 2009 Milos Jakubicek - 0.6.1-2 - Fix licensing issue (BSD instead of BSD with advertising) - Convert all docs into utf8, no execute bit on LICENSING.INFO - Added BR: gtk+-devel * Tue Feb 17 2009 Milos Jakubicek - 0.6.1-1 - Update to 0.6.1 * Tue Sep 16 2008 Milos Jakubicek - 0.6.0-3 - Added README.twsetroot, setroot.sample, diagram.txt and FAQ to docs - Added missing BR gpm-devel * Mon Sep 15 2008 Milos Jakubicek - 0.6.0-2 - Preserved timestamps. * Mon Sep 8 2008 Milos Jakubicek - 0.6.0-1 - Initial release.