This repository has been archived by the owner on Mar 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibindicator.spec
170 lines (142 loc) · 4.46 KB
/
libindicator.spec
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
Name: libindicator
Version: 16.10.0
Release: 1%{?dist}
Summary: Shared functions for Ayatana indicators
License: GPLv3
URL: https://launchpad.net/libindicator
Source0: http://archive.ubuntu.com/ubuntu/pool/universe/libi/libindicator/libindicator_16.10.0+18.04.20180321.1.orig.tar.gz
# From GLib 2.62
Patch1: http://archive.ubuntu.com/ubuntu/pool/universe/libi/libindicator/libindicator_16.10.0+18.04.20180321.1-0ubuntu5.diff.gz
BuildRequires: chrpath
BuildRequires: gtk-doc
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: dbus-glib-devel
BuildRequires: gtk2-devel
BuildRequires: gtk3-devel
#Requires: ido-devel
BuildRequires: gnome-common
BuildRequires: make
%description
A set of symbols and convenience functions that all Ayatana indicators are
likely to use.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package gtk3
Summary: GTK+3 build of %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description gtk3
A set of symbols and convenience functions that all Ayatana indicators
are likely to use. This is the GTK+ 3 build of %{name}, for use
by GTK+ 3 apps.
%package gtk3-devel
Summary: Development files for %{name}-gtk3
Requires: %{name}-gtk3%{?_isa} = %{version}-%{release}
Requires: pkgconfig
%description gtk3-devel
The %{name}-gtk3-devel package contains libraries and header files for
developing applications that use %{name}-gtk3.
%prep
%setup -q -c
%patch1 -p1 -b .orig
# Remove all IDO references
# This is only needed for tools/indicator-loader.c
sed -i '6d' ./Makefile.am
sed -i 's!libindicator \\!libindicator!' Makefile.am
sed -i '59d' configure.ac
sed -ie 58's/$/) &/' configure.ac
sed -i.addvar configure.ac \
-e '\@LIBINDICATOR_LIBS@s|\$LIBM| \$LIBM|'
sed -i 's!tests/Makefile!!' configure.ac
NOCONFIGURE=1 \
sh autogen.sh
%build
%global _configure ../configure
rm -rf build-gtk2 build-gtk3
mkdir build-gtk2 build-gtk3
pushd build-gtk2
export CFLAGS="%{optflags} -Wno-error=deprecated-declarations"
%configure --with-gtk=2 --disable-tests --disable-static --disable-silent-rules
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
popd
pushd build-gtk3
export CFLAGS="%{optflags} -Wno-error=deprecated-declarations"
%configure --with-gtk=3 --disable-tests --disable-static --disable-silent-rules
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
popd
%install
pushd build-gtk2
make install DESTDIR=%{buildroot}
popd
(
PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig
export PKG_CONFIG_PATH
for var in \
iconsdir \
indicatordir \
%{nil}
do
vardir=$(pkg-config --variable=${var} indicator-0.4)
mkdir -p %{buildroot}${vardir}
done
)
pushd build-gtk3
make install DESTDIR=%{buildroot}
popd
(
PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig
export PKG_CONFIG_PATH
for var in \
iconsdir \
indicatordir \
%{nil}
do
vardir=$(pkg-config --variable=${var} indicator3-0.4)
mkdir -p %{buildroot}${vardir}
done
)
# Ubuntu doesn't package the dummy indicator
#rm -f %{buildroot}%{_libdir}/libdummy-indicator*.so
# Remove libtool files
find %{buildroot} -type f -name '*.la' -delete
%ldconfig_scriptlets
%ldconfig_scriptlets gtk3
%files
%license COPYING
%doc AUTHORS COPYING NEWS ChangeLog
%{_libdir}/libindicator.so.*
%{_prefix}/lib/indicators/
%dir %{_datadir}/libindicator/
%dir %{_datadir}/libindicator/icons/
%{_userunitdir}/indicators-pre.target
%files devel
%dir %{_includedir}/libindicator-0.4/
%dir %{_includedir}/libindicator-0.4/libindicator/
%{_includedir}/libindicator-0.4/libindicator/*.h
%{_libdir}/libindicator.so
%{_libdir}/pkgconfig/indicator-0.4.pc
%files gtk3
%doc AUTHORS COPYING NEWS ChangeLog
%{_libdir}/libindicator3.so.*
%{_prefix}/lib/indicators3/
%dir %{_datadir}/libindicator/
%dir %{_datadir}/libindicator/icons/
%files gtk3-devel
%dir %{_includedir}/libindicator3-0.4/
%dir %{_includedir}/libindicator3-0.4/libindicator/
%{_includedir}/libindicator3-0.4/libindicator/*.h
%{_libdir}/libindicator3.so
%{_libdir}/pkgconfig/indicator3-0.4.pc
%changelog
%autochangelog