From: Ladislav Michl <[email protected]> This partially reverts commit 9de860c283e9c33727aa35bf3c766dfd4a37f9bd.
Signed-off-by: Ladislav Michl <[email protected]> --- CHANGES: - v2: None rules/libsemanage.in | 29 +++++++++++++++++ rules/libsemanage.make | 70 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 rules/libsemanage.in create mode 100644 rules/libsemanage.make diff --git a/rules/libsemanage.in b/rules/libsemanage.in new file mode 100644 index 000000000..9d7ebf03d --- /dev/null +++ b/rules/libsemanage.in @@ -0,0 +1,29 @@ +## SECTION=staging +## old section: +### SECTION=selinux + +menuconfig LIBSEMANAGE + tristate + prompt "libsemanage " + select BZIP2 + select BZIP2_LIBBZ2 + select LIBSEPOL + select LIBSELINUX + select USTR + select PYTHON if LIBSEMANAGE_PYTHON + select HOST_SWIG if LIBSEMANAGE_PYTHON + help + This package provides the shared libraries for SELinux policy management. + It uses libsepol for binary policy manipulation and libselinux for + interacting with the SELinux system. + + STAGING: remove in ptxdist-2020.12.0 + Old version that need to be updated. Moved to staging with libselinux. + +if LIBSEMANAGE + +config LIBSEMANAGE_PYTHON + bool "python wrapper" + depends on STAGING + +endif diff --git a/rules/libsemanage.make b/rules/libsemanage.make new file mode 100644 index 000000000..9e8a641e9 --- /dev/null +++ b/rules/libsemanage.make @@ -0,0 +1,70 @@ +# -*-makefile-*- +# +# Copyright (C) 2012 by Wolfram Sang <[email protected]> +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_LIBSEMANAGE) += libsemanage + +# +# Paths and names +# +LIBSEMANAGE_VERSION := 2.1.9 +LIBSEMANAGE_MD5 := 209e11da5b36c595a796751583f016f8 +LIBSEMANAGE := libsemanage-$(LIBSEMANAGE_VERSION) +LIBSEMANAGE_SUFFIX := tar.gz +LIBSEMANAGE_URL := https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20120924/$(LIBSEMANAGE).$(LIBSEMANAGE_SUFFIX) +LIBSEMANAGE_SOURCE := $(SRCDIR)/$(LIBSEMANAGE).$(LIBSEMANAGE_SUFFIX) +LIBSEMANAGE_DIR := $(BUILDDIR)/$(LIBSEMANAGE) +LIBSEMANAGE_LICENSE := LGPL-2.1-or-later + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +LIBSEMANAGE_CONF_TOOL := NO +# no := due to CROSS_PYTHON +LIBSEMANAGE_MAKE_ENV = \ + $(CROSS_ENV) \ + CFLAGS="-O2 -Wall -g" \ + PYTHON=$(CROSS_PYTHON) + +LIBSEMANAGE_MAKE_OPT := \ + LIBDIR=$(PTXDIST_SYSROOT_TARGET)/usr/lib +LIBSEMANAGE_INSTALL_OPT := \ + install + +ifdef PTXCONF_LIBSEMANAGE_PYTHON +LIBSEMANAGE_MAKE_OPT += pywrap +LIBSEMANAGE_INSTALL_OPT += install-pywrap +endif + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/libsemanage.targetinstall: + @$(call targetinfo) + + @$(call install_init, libsemanage) + @$(call install_fixup, libsemanage,PRIORITY,optional) + @$(call install_fixup, libsemanage,SECTION,base) + @$(call install_fixup, libsemanage,AUTHOR,"Wolfram Sang <[email protected]>") + @$(call install_fixup, libsemanage,DESCRIPTION,missing) + + @$(call install_lib, libsemanage, 0, 0, 0644, libsemanage) + @$(call install_alternative, libsemanage, 0, 0, 0644, /etc/selinux/semanage.conf) + +ifdef PTXCONF_LIBSEMANAGE_PYTHON + @$(call install_tree, libsemanage, 0, 0, -, $(PYTHON_SITEPACKAGES)) +endif + @$(call install_finish, libsemanage) + + @$(call touch) + +# vim: syntax=make -- 2.47.3
