summaryrefslogtreecommitdiff
path: root/gtk3-stackrpms/gtk3-nocsd/gtk3-nocsd.spec
blob: 968103019e48c53310b780e52e84de466e845fb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Name:           gtk3-nocsd
Version:        3
Release:        13%{?dist}
Summary:        Disables the client side decoration of Gtk+ 3

License:        LGPLv2.1
URL:            https://github.com/PCMan/%{name}
Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
# AUR - Marco Kundt
Source1:        https://aur.archlinux.org/cgit/aur.git/plain/30-%{name}.sh?h=%{name}-git#/30-%{name}.sh

Patch0:         %{name}-multilib.patch
Patch1:         %{url}/commit/c64505268575e60322de682ea751660eba8d0e71.patch#/%{name}-gh-c64505268575e60322de682ea751660eba8d0e71.patch
Patch2:         %{url}/commit/82ff5a0da54aa6da27232b55eb93e5f4b5de22f2.patch#/%{name}-gh-82ff5a0da54aa6da27232b55eb93e5f4b5de22f2.patch

BuildRequires:  make
BuildRequires:  gcc
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(gtk+-3.0)

%description
%{name} is a small module used to disable the client side decoration of
Gtk+ 3.

%prep
%autosetup -p1

cp -p %{SOURCE1} %{name}.sh

sed \
  -e "/x\"$GTK_CSD\"x/s,\],\0 \&\& echo \$LD_PRELOAD | grep -v -q -F \'/usr/\${LIB}/libgtk3-nocsd.so.0\'," \
  -i %{name}.sh

sed -e 's|$(LDFLAGS_LIB)|\0 $(LDFLAGS)|g' -i Makefile

%build

%set_build_flags
export prefix=%{_prefix}
export libdir=%{_libdir}
export bindir=%{_bindir}
export datadir=%{_datadir}
export mandir=%{_mandir}

%make_build

%install

export prefix=%{_prefix}
export libdir=%{_libdir}
export bindir=%{_bindir}
export datadir=%{_datadir}
export mandir=%{_mandir}

%make_install

chmod +x %{buildroot}%{_libdir}/lib%{name}.so.0

mkdir -p %{buildroot}%{_sysconfdir}/profile.d
install -pm0644 %{name}.sh %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh

%files
%license COPYING
%doc ChangeLog README.md
%{_sysconfdir}/profile.d/%{name}.sh
%{_bindir}/%{name}
%{_libdir}/lib%{name}.so.0
%{_datadir}/bash-completion/completions/%{name}
%{_mandir}/man1/%{name}.1*

%changelog
* Thu May 27 2021 B. Stack <bgstack15@gmail.com> - 3-13
- fork to stackrpms

* Mon Feb 20 2017 Phantom X <megaphantomx at bol dot com dot br> - 3-3
- Tweak profile script
- Drop %%config from profile script

* Sun Feb 19 2017 Phantom X <megaphantomx at bol dot com dot br> - 3-2
- Fix multilib

* Fri Feb 10 2017 Phantom X <megaphantomx at bol dot com dot br> - 3-1
- Initial spec
bgstack15