Package libteam: Specfile
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 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | #define git_hash .g7cb5de8 %define git_hash %nil %def_disable zmq %def_with docs %def_without python %define _pseudouser_user _teamd %define _pseudouser_group _teamd %define teamd_rundir /run/teamd Name: libteam Version: 1.32 Release: alt1%git_hash Summary: Library for controlling team network device License: LGPLv2.1+ Group: System/Libraries URL: http://www.libteam.org Vcs: https://github.com/jpirko/libteam Source: %name-%version.tar Patch: %name-%version-%release.patch BuildRequires: libnl-devel BuildRequires: libdaemon-devel BuildRequires: libjansson-devel BuildRequires: libdbus-devel BuildRequires: libcap-devel %{?_with_python:BuildRequires: python3-devel python3-module-setuptools swig} %{?_enable_zmq:BuildRequires: libzeromq-devel} %{?_with_docs:BuildRequires: doxygen} %define _unpackaged_files_terminate_build 1 %description This package contains a library which is a user-space counterpart for team network driver. It provides an API to control team network devices. %package devel Summary: Development files for %name Group: Development/C Requires: %name = %version-%release %description devel This package contains libraries and header files for developing applications that use %name. %package devel-doc Summary: This package contains development documentation for %name Group: Development/Documentation BuildArch: noarch Requires: %name-devel = %version-%release %description devel-doc This package contains development documentation for %name %package -n libteamdctl Summary: Library for communication with teamd Group: System/Libraries %description -n libteamdctl This is a library for communication with teamd process (via D-Bus, Unix socket or zeromq). It is used by the teamdctl utility. %package -n libteamdctl-devel Summary: Development files for libteamdctl Group: Development/C Requires: libteamdctl = %version-%release %description -n libteamdctl-devel This package contains libraries and header files for developing applications that use libteamdctl. %package utils Summary: Command line interface utils for %name and teamd Group: System/Base %description utils This package contains various libteam utils. %package -n teamd Summary: Team network device control daemon Group: System/Servers Requires: %name = %version-%release %description -n teamd This package contains team network device control daemon. %if_with python %package -n python3-module-team Summary: Team network device library bindings for Python3 Group: Development/Python3 Requires: %name = %version-%release %add_python3_self_prov_path %buildroot%python3_sitelibdir/ %description -n python3-module-team This package contains a module that permits applications written in the Python3 programming language to use the interface supplied by team network device library. %endif %prep %setup %patch -p1 %if_with docs # prepare example dir for -devel mkdir -p _tmpdoc1/examples cp -p examples/*.c _tmpdoc1/examples %endif %if_with python # prepare example dir for python module mkdir -p _tmpdoc2/examples cp -p examples/python/*.py _tmpdoc2/examples chmod -x _tmpdoc2/examples/*.py %endif %build %autoreconf %configure \ --disable-static \ %{subst_enable zmq} \ --enable-dbus \ --with-user=%_pseudouser_user \ --with-group=%_pseudouser_group \ --with-run-dir=%teamd_rundir \ --disable-silent-rules %make_build %if_with docs %make_build html %endif %if_with python cd binding/python %python3_build %endif %install %makeinstall_std install -pDm 0644 teamd/dbus/teamd.conf %buildroot%_datadir/dbus-1/system.d/teamd.conf mkdir -p %buildroot%_tmpfilesdir cat > %buildroot%_tmpfilesdir/teamd.conf <<EOF # See tmpfiles.d(5) for details # Type(d=directory) Path Mode UID GID Age(until delete when cleaning) d %teamd_rundir/ 0755 %_pseudouser_user %_pseudouser_group - EOF %if_with python cd binding/python %python3_install install -pm 0644 team/capi.py %buildroot%python3_sitelibdir/team/ %endif %pre -n teamd /usr/sbin/groupadd -r -f %_pseudouser_group ||: /usr/sbin/useradd -g %_pseudouser_group -c 'teamd user' \ -d /dev/null -s /dev/null -r %_pseudouser_user >/dev/null 2>&1 ||: %files %_libdir/libteam.so.* %files devel %_includedir/team.h %_libdir/libteam.so %_pkgconfigdir/libteam.pc %if_with docs %files devel-doc %doc _tmpdoc1/examples doc/api %endif %files -n libteamdctl %_libdir/libteamdctl.so.* %files -n libteamdctl-devel %_includedir/teamdctl.h %_libdir/libteamdctl.so %_pkgconfigdir/libteamdctl.pc %files utils %_bindir/bond2team %_bindir/teamnl %_man1dir/bond2team.1* %_man8dir/teamnl.8* %files -n teamd %doc teamd/example_configs %_datadir/dbus-1/system.d/teamd.conf %_tmpfilesdir/teamd.conf %_bindir/teamd* %_man5dir/teamd.conf.5* %_man8dir/teamd*.8* %if_with python %files -n python3-module-team %doc _tmpdoc2/examples %python3_sitelibdir/* %endif %changelog * Tue Oct 31 2023 Mikhail Efremov <sem@altlinux.org> 1.32-alt1 - Use /run/teamd/ as teamd rundir. - Updated to 1.32. * Mon Aug 21 2023 Mikhail Efremov <sem@altlinux.org> 1.31-alt3.g7cb5de8 - Disabled python binding. - python binding: fixed build with modern swig. - Upstream git snapshot. * Sat Nov 12 2022 Daniel Zagaynov <kotopesutility@altlinux.org> 1.31-alt2.g69a7494.1 - NMU: used %%add_python3_self_prov_path macro to skip self-provides from dependencies. * Tue Aug 09 2022 Mikhail Efremov <sem@altlinux.org> 1.31-alt2.g69a7494 - Add tmpfiles config for /var/run/teamd/ directory. - teamd: better handle failures to chown(TEAMD_RUN_DIR) during teamd_drop_privileges() (patch from openSUSE) (closes: #43269). - Don't package teamd@.service (closes: #41998). - Upstream git snapshot (closes: #43298). * Mon Aug 03 2020 Mikhail Efremov <sem@altlinux.org> 1.31-alt1 - 1.30 -> 1.31. * Thu Jan 09 2020 Mikhail Efremov <sem@altlinux.org> 1.30-alt1 - Use Vcs tag. - Don't use rpm-build-licenses. - 1.29 -> 1.30. * Fri Jul 05 2019 Mikhail Efremov <sem@altlinux.org> 1.29-alt1 - 1.28 -> 1.29. * Mon Dec 10 2018 Mikhail Efremov <sem@altlinux.org> 1.28-alt1 - Use python3 in shebangs. - Build python3 module instead of python2. - 1.27 -> 1.28. * Fri Oct 06 2017 Mikhail Efremov <sem@altlinux.org> 1.27-alt2 - Fix python module build. - Switch to _teamd user. - Make build of python module optional. * Wed Oct 04 2017 Mikhail Efremov <sem@altlinux.org> 1.27-alt1 - Initial build |