]> git.sesse.net Git - bcachefs-tools-debian/blob - packaging/bcachefs-tools.spec
add rpm make target and fix up spec file
[bcachefs-tools-debian] / packaging / bcachefs-tools.spec
1 Name:           bcachefs-tools
2 # define with i.e. --define '_version 1.0'
3 Version:        %{_version}
4 Release:        1%{?dist}
5 Summary:        Userspace tools for bcachefs
6
7 License:        GPLv2
8 URL:            https://github.com/koverstreet/bcachefs-tools
9
10 BuildRequires:  gcc
11 BuildRequires:  make
12 BuildRequires:  cargo
13 BuildRequires:  clang-devel
14 BuildRequires:  keyutils-libs-devel
15 BuildRequires:  libaio-devel
16 BuildRequires:  libattr-devel
17 BuildRequires:  libblkid-devel
18 BuildRequires:  libsodium-devel
19 BuildRequires:  libuuid-devel
20 BuildRequires:  libzstd-devel
21 BuildRequires:  lz4-devel
22 BuildRequires:  systemd-devel
23 BuildRequires:  userspace-rcu-devel
24 BuildRequires:  zlib-devel
25
26 %description
27 The bcachefs tool, which has a number of subcommands for formatting and managing bcachefs filesystems. Run bcachefs --help for full list of commands.
28
29 %prep
30 %setup -q
31
32 %build
33 %make_build V=0 --no-print-directory
34
35 %install
36 rm -rf $RPM_BUILD_ROOT
37 mkdir -p $RPM_BUILD_ROOT%{_sbindir}
38 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
39 %make_install PREFIX=%{_exec_prefix} ROOT_SBINDIR=%{_sbindir}
40
41 # These may be debian-specific, and for unlocking encrypted root fs
42 rm -f %{buildroot}/%{_datadir}/initramfs-tools/hooks/bcachefs
43 rm -f %{buildroot}/%{_datadir}/initramfs-tools/scripts/local-premount/bcachefs
44 # The library is not needed by userspace
45 rm -f %{buildroot}/usr/lib/libbcachefs.so
46
47 %files
48 %{_sbindir}/mount.bcachefs
49 %{_sbindir}/bcachefs
50 %{_sbindir}/fsck.bcachefs
51 %{_sbindir}/mkfs.bcachefs
52 %{_mandir}/man8/bcachefs.8.gz
53
54 %changelog
55 * Tue Nov 15 2022 Eric Sandeen <sandeen@sandeen.net> - 2022.11.15-1
56 - NOTE: This binary RPM has been built directly from the bcachefs-tools
57   git tree with "make rpm" from the git hash indicated in the package version.
58 - Update spec file to allow in-tree rpm builds
59 - Remove maually added Requires: and unneeded build-requires
60
61 * Tue Jan 21 2020 Michael Adams <unquietwiki@gmail.com> - 2020.01.21-1
62 - Updated RPM package definition to reflect that changes in codebase have occurred.
63
64 * Tue Jan 07 2020 Michael Adams <unquietwiki@gmail.com> - 2020.01.07-1
65 - Initial RPM package definition
66 - Makefile needs further work to accomodate RPM macros.