Skip to content

Commit

Permalink
add libscfg
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcarroty authored Mar 28, 2024
1 parent 05b3175 commit d81bd98
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions kanshi.spec
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
%global libscfg_ver 0.1.1


Name : kanshi
Version : 1.6.0
Release : 1
URL : https://git.sr.ht/~emersion/kanshi
Source0 : https://git.sr.ht/~emersion/kanshi/archive/v%{version}.tar.gz
Source1 : https://git.sr.ht/~emersion/libscfg/archive/v%{libscfg_ver}.tar.gz
Summary : Dynamic display configuration
Group : Development/Tools
License : MIT
Expand All @@ -15,7 +19,7 @@ Kanshi allows you to define output profiles that are automatically enabled
and disabled on hotplug.

%prep
%setup -q -n kanshi-v%{version}
%setup -q -n kanshi-v%{version} -a 1

%build
export GCC_IGNORE_WERROR=1
Expand All @@ -26,15 +30,23 @@ export CFLAGS="$CFLAGS -O3 -ffat-lto-objects -flto=auto "
export FCFLAGS="$FFLAGS -O3 -ffat-lto-objects -flto=auto "
export FFLAGS="$FFLAGS -O3 -ffat-lto-objects -flto=auto "
export CXXFLAGS="$CXXFLAGS -O3 -ffat-lto-objects -flto=auto "
meson \
--libdir=lib64 --prefix=/usr \
--buildtype=plain builddir

pushd libscfg-v%{libscfg-ver}
meson --libdir=lib64 --prefix=/usr --buildtype=plain builddir2
ninja -v -C builddir2
DESTDIR=/ ninja -C builddir2 install
popd

meson --libdir=lib64 --prefix=/usr --buildtype=plain builddir
ninja -v -C builddir

%install
DESTDIR=%{buildroot} ninja -C builddir install
mkdir %{buildroot}/usr/lib64
cp /usr/lib64/libscfg.so %{buildroot}/usr/lib64/libscfg.so
rm -rf %{buildroot}/usr/share/man

%files
%defattr(-,root,root,-)
/usr/bin/kanshi
/usr/lib64/libscfg.so

0 comments on commit d81bd98

Please sign in to comment.