Summary: Library that offers pseudo-tty management in an OS-independent way Name: libptytty Version: 1.3 Release: 1 License: GPLv2 Group: System Environment/Libraries Source0: http://download.gnome.org/sources/pango/1.22/%{name}-%{version}.tar.bz2 URL: http://software.schmorp.de/pkg/libptytty BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: make %description Libptytty is a small library that offers pseudo-tty management in an OS-independent way. It was created out of frustration over the many differences of pty/tty handling in different operating systems for the use inside "rxvt-unicode". In addition to offering mere pty/tty management, it also offers session database support (utmp and optional wtmp/lastlog updates for login shells). It also supports fork'ing after startup and dropping privileges in the calling process, so in case the calling process gets compromised by the user starting the program there is less to gain, as only the helper process runs with privileges (e.g. setuid/setgid), which reduces the area of attack immensely. Libptytty is written in C++, but it also offers a C-only API. The library is available as 32-bit and 64-bit. %package devel Summary: Library that offers pseudo-tty management in an OS-independent way Group: Development/Libraries Requires: libptytty = %{version}-%{release} %description devel The %{name}-devel package includes the header files and developer docs for the %{name} package. Install %{name}-devel if you want to develop programs which will use %{name}. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc -q64" or "gcc -maix64". %prep %setup -q %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="cc -q64" ./configure \ --prefix=%{_prefix} \ --enable-shared --enable-static \ --enable-utmp --enable-wtmp --enable-lastlog gmake %{?_smp_mflags} cp ./src/.libs/%{name}.so.0 . make distclean # now build the 32-bit version export CC="xlc" ./configure \ --prefix=%{_prefix} \ --enable-shared --enable-static \ --enable-utmp --enable-wtmp --enable-lastlog gmake %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q ./src/.libs/%{name}.a ./%{name}.so.0 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT} for dir in include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc README Changes COPYING %{_libdir}/*.a %{_mandir}/man3/* /usr/lib/*.a %files devel %defattr(-,root,system) %{_includedir}/* %{_libdir}/*.la /usr/include/* /usr/lib/*.la %changelog * Tue Jun 30 2009 Michael Perzl - 1.3-1 - first version for AIX V5.1 and higher