diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml new file mode 100644 index 0000000..93acccf --- /dev/null +++ b/.forgejo/workflows/build.yaml @@ -0,0 +1,19 @@ +on: [push] + +jobs: + build: + runs-on: docker + container: + image: fedora:40 + steps: + - run: dnf install -y nodejs rpmdevtools + - name: set up base build env + run: rpmdev-setuptree + - uses: https://code.forgejo.org/actions/checkout@v4 + - name: build dwarfs rpm package + run: rpmbuild -bb dwarfs.spec + + - uses: forgejo/upload-artifact@v4 + with: + name: dwarfs.rpm + path: $(find $HOME/rpmbuild/RPMS/$(rpm -E '%{_arch}')/ -type f) # le bodge but should work \ No newline at end of file diff --git a/README.md b/README.md index 293972e..2bff70b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ -# rpmtemplate +# fedora-dwarfs -rpm package template \ No newline at end of file +a makeshift [dwarfs](https://github.com/mhx/dwarfs) package for fedora + +i know that this isn't the correct way to package things but i don't have the energy right now to do it correctly + +contents of this repo are under the MIT license, package is GPLv3 as dwarfs is GPLv3 + +i think this should be okay as the contents in this repo don't modify the source or binaries \ No newline at end of file diff --git a/dwarfs.spec b/dwarfs.spec new file mode 100644 index 0000000..103b4fa --- /dev/null +++ b/dwarfs.spec @@ -0,0 +1,46 @@ +Name: dwarfs +Version: 0.9.9 +Release: 1%{?dist} +Summary: A fast high compression read-only file system +URL: https://github.com/mhx/dwarfs +License: GPLv3 +BuildArch: %{_arch} + +BuildRequires: wget +BuildRequires: tar + +Requires: fuse3 +Requires: lz4 +Requires: zstd +Requires: liblzma + +%description +A fast high compression read-only file system + +%prep +wget https://github.com/mhx/dwarfs/releases/download/v%{version}/dwarfs-%{version}-Linux-%{_arch}-clang.tar.xz +tar -xvf dwarfs-%{version}-Linux-%{_arch}-clang.tar.xz + +%install +mkdir -p %{buildroot}%{_mandir} + +cp -vr dwarfs-%{version}-Linux-%{_arch}-clang/bin/ %{buildroot}%{_bindir} +cp -vr dwarfs-%{version}-Linux-%{_arch}-clang/sbin/* %{buildroot}%{_bindir} # bin and sbin are the same in fedora +cp -vr dwarfs-%{version}-Linux-%{_arch}-clang/share/man/* %{buildroot}%{_mandir} # bin and sbin are the same in fedora + +%files +%{_bindir}/dwarfsbench +%{_bindir}/dwarfsck +%{_bindir}/dwarfsextract +%{_bindir}/mkdwarfs +%{_bindir}/dwarfs +%{_bindir}/dwarfs2 +%{_bindir}/mount.dwarfs +%{_bindir}/mount.dwarfs2 + +%{_mandir}/man1/dwarfs.1.gz +%{_mandir}/man1/dwarfsck.1.gz +%{_mandir}/man1/dwarfsextract.1.gz +%{_mandir}/man1/mkdwarfs.1.gz + +%{_mandir}/man5/dwarfs-format.5.gz \ No newline at end of file diff --git a/rpmtemplate.spec b/rpmtemplate.spec deleted file mode 100644 index f3bd619..0000000 --- a/rpmtemplate.spec +++ /dev/null @@ -1,25 +0,0 @@ -Name: rpmtemplate -Version: 1 -Release: 1 -Summary: basic rpm package template -License: MIT -BuildArch: noarch - -Requires: bash - -%description -basic rpm package template - -%prep -echo "prep here" - -%build -echo "#!/bin/bash" > rpmtemplate -echo "echo Hello World!" >> rpmtemplate - -%install -mkdir -p %{buildroot}%{_bindir} -install -m 755 rpmtemplate %{buildroot}%{_bindir} - -%files -%{_bindir}/rpmtemplate \ No newline at end of file