diff mbox series

ksmbd-tools: Add ksmbd-tools.spec template

Message ID 20211004124704.17616-1-ematsumiya@suse.de (mailing list archive)
State New, archived
Headers show
Series ksmbd-tools: Add ksmbd-tools.spec template | expand

Commit Message

Enzo Matsumiya Oct. 4, 2021, 12:47 p.m. UTC
ksmbd-tools.spec should serve as a base template for RPM packagers.

Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
---
 README           |  2 ++
 ksmbd-tools.spec | 63 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 ksmbd-tools.spec

Comments

Namjae Jeon Oct. 6, 2021, 3:20 a.m. UTC | #1
2021-10-04 21:47 GMT+09:00, Enzo Matsumiya <ematsumiya@suse.de>:
> ksmbd-tools.spec should serve as a base template for RPM packagers.
>
> Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
Applied, Thanks for your patch!
diff mbox series

Patch

diff --git a/README b/README
index 3dce3bb41c6e..c64b75c58c2f 100644
--- a/README
+++ b/README
@@ -13,6 +13,8 @@  Install preprequisite packages:
 	For CentOS:
 	sudo yum install glib2-devel libnl3-devel
 
+ksmbd-tools.spec should serve as a base template for RPM packagers.
+
 Build steps:
         - cd into the ksmbd-tools directory
         - ./autogen.sh
diff --git a/ksmbd-tools.spec b/ksmbd-tools.spec
new file mode 100644
index 000000000000..901ca6e6cb76
--- /dev/null
+++ b/ksmbd-tools.spec
@@ -0,0 +1,63 @@ 
+#
+# spec file for package ksmbd-tools
+#
+# Copyright (c) 2021 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/
+#
+
+Name:           ksmbd-tools
+Version:        3.4.2
+Release:        0
+Summary:        cifsd/ksmbd kernel server userspace utilities
+License:        GPL-2.0-or-later
+Group:          System/Filesystems
+Url:            https://github.com/namjaejeon/ksmbd-tools
+Source:         %{name}-%{version}.tar.bz2
+
+# ksmbd kernel module was only added in kernel 5.15
+BuildRequires:  kernel-default >= 5.15
+BuildRequires:  glib2-devel
+BuildRequires:  libnl3-devel
+BuildRequires:  autoconf
+BuildRequires:  automake
+BuildRequires:	libtool
+
+Requires(pre):	kernel-default >= 5.15
+
+%description
+Set of utilities for creating and managing SMB3 shares for the ksmbd kernel
+module.
+
+%prep
+%setup -q
+
+%build
+./autogen.sh
+%configure
+make %{?_smp_mflags}
+
+%install
+mkdir -p %{buildroot}/%{_sysconfdir}/ksmbd
+
+%make_install
+install -m 644 -p smb.conf.example %{buildroot}%{_sysconfdir}/ksmbd
+
+%files
+%{_sbindir}/ksmbd.addshare
+%{_sbindir}/ksmbd.adduser
+%{_sbindir}/ksmbd.control
+%{_sbindir}/ksmbd.mountd
+%dir %{_sysconfdir}/ksmbd
+%config %{_sysconfdir}/ksmbd/smb.conf.example
+
+%changelog