- Initial package

OBS-URL: https://build.opensuse.org/package/show/Linux-PAM/wtmpdb?expand=0&rev=1
This commit is contained in:
Thorsten Kukuk 2023-03-30 13:15:35 +00:00 committed by Git OBS Bridge
commit 88c46a1bde
5 changed files with 134 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
wtmpdb-0.1.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b036523c4d82b054ce3664c934e21f82939946db1ca484231aad27b7ff50ccc5
size 12120

4
wtmpdb.changes Normal file
View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Thu Mar 30 13:12:09 UTC 2023 - Thorsten Kukuk <kukuk@suse.com>
- Initial package

103
wtmpdb.spec Normal file
View File

@ -0,0 +1,103 @@
#
# spec file for package wtmpdb
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define lname libwtmpdb0
Name: wtmpdb
Version: 0.1.0
Release: 0
Summary: Reports last logged in users and system reboots
License: BSD-2-Clause
URL: https://github.com/thkukuk/wtmpdb
Source: %{name}-%{version}.tar.xz
BuildRequires: docbook5-xsl-stylesheets
BuildRequires: meson
BuildRequires: pkgconfig
BuildRequires: pkgconfig(pam)
BuildRequires: pkgconfig(sqlite3)
PreReq: pam-config
%description
pam_wtmpdb and wtmpdb are Y2038 safe versions of wtmp and the last utility. pam_wtmpdb collects all data in a sqlite3 database and wtmpdb creates boot and shutdown entries or formats and prints the contents of the wtmp database.
%package -n %{lname}
Summary: PAM module to store login and logout of users
%description -n %{lname}
The libwtmpdb provides various interfaces to read, write or modify the wtmpdb database.
%package devel
Summary: Development files for libwtmpdb
Requires: %{lname} = %{version}
%description devel
This package contains all necessary include files and libraries needed
to develop applications that needs to read, write or modify the wtmpdb database.
%prep
%setup -q
%build
%meson -Dman=true
%meson_build
%install
%meson_install
%check
%meson_test
%pre
%service_add_pre wtmpdb-update-boot.service
%preun
%service_del_preun wtmpdb-update-boot.service
%post
%tmpfiles_create wtmpdb.conf
%service_add_post wtmpdb-update-boot.service
pam-config -a --wtmpdb
%postun
if [ "$1" -eq 0 ]; then
pam-config -d --wtmpdb
fi
%service_del_postun_without_restart wtmpdb-update-boot.service
%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig
%files
%license LICENSE
%{_bindir}/wtmpdb
%{_unitdir}/wtmpdb-update-boot.service
%{_tmpfilesdir}/wtmpdb.conf
%{_pam_moduledir}/pam_wtmpdb.so
%ghost %{_localstatedir}/lib/wtmpdb
#%{_mandir}/man8/wtmpdb.8%{?ext_man}
#%{_mandir}/man8/pam_wtmpdb.8%{?ext_man}
%files -n %{lname}
%license LICENSE
%{_libdir}/libwtmpdb.so.*
%files devel
%{_libdir}/libwtmpdb.so
%{_includedir}/wtmpdb.h
%{_libdir}/pkgconfig/libwtmpdb.pc
%changelog