diff --git a/README.md b/README.md index 9ee5b89..ba873b7 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # libutempter +This library provides interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files. + diff --git a/libutempter.spec b/libutempter.spec new file mode 100644 index 0000000..c11330d --- /dev/null +++ b/libutempter.spec @@ -0,0 +1,97 @@ +%define utmp_gid 17 +%define utempter_gid 51 +Name: libutempter +Version: 1.1.6 +Release: 1mamba +Summary: A privileged helper for utmp/wtmp updates +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Tiziana Ferro +URL: ftp://ftp.altlinux.org/pub/people/ldv/utempter +Source: ftp://ftp.altlinux.org/pub/people/ldv/utempter/libutempter-%{version}.tar.bz2 +License: LGPL +BuildRoot: %{_tmppath}/%{name}-%{version}-root +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +## AUTOBUILDREQ-END +Provides: utempter = %{version} +Obsoletes: utempter + +%description +This library provides interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files. + +%package devel +Group: Development/Libraries +Summary: Static libraries and headers for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +This package contains development files required to build utempter-based software. + +This package contains static libraries and header files need for development. + +%prep +%setup -q + +%build +%make libdir=%{_libdir} + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall DESTDIR="%{buildroot}" libdir=%{_libdir} + +# NOTE: Static lib intentionally disabled. +rm -f $RPM_BUILD_ROOT%{_libdir}/*.a + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%pre +%{_sbindir}/groupadd -g %{utmp_gid} -r utmp 2>/dev/null || : +%{_sbindir}/groupadd -g %{utempter_gid} -r utempter 2>/dev/null || : +: + +%postun +/sbin/ldconfig +if [ $1 -eq 0 ]; then + %{_sbindir}/groupdel utempter +fi +: + +%post -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_libdir}/*.so.* +%dir %attr(755,root,utempter) %{_prefix}/lib/utempter +%attr(2711,root,utmp) %{_prefix}/lib/utempter/utempter +%doc COPYING README +# FIXME: If a symlink is needed for compat here, uncomment the code in the +# install section and this as well: +#%{_sbindir}/utempter + +%files devel +%defattr(-,root,root,-) +%{_includedir}/utempter.h +%{_libdir}/libutempter.so +%{_mandir}/man3/libutempter.3.gz +%{_mandir}/man3/utempter.3.gz +%{_mandir}/man3/utempter_add_record.3.gz +%{_mandir}/man3/utempter_remove_added_record.3.gz +%{_mandir}/man3/utempter_remove_record.3.gz +%{_mandir}/man3/utempter_set_helper.3.gz + +%changelog +* Sat Aug 11 2012 Automatic Build System 1.1.6-1mamba +- automatic version update by autodist + +* Mon Feb 08 2010 Silvan Calarco 1.1.5-3mamba +- remove missing groupadd option -f +- assign proper id's for utmp and utempter gropus from openmamba resources db + +* Fri Oct 31 2008 Silvan Calarco 1.1.5-2mamba +- fixed specfile name + +* Thu Oct 30 2008 Tiziana Ferro 1.1.5-1mamba +- package created by autospec