...
 
Commits (2)
diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
index 977b5c8c..8b8eedb8 100644
--- a/libselinux/src/Makefile
+++ b/libselinux/src/Makefile
@@ -128,6 +128,10 @@ SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./ $(DISABLE_FLAGS)
SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(DISABLE_FLAGS)
+# Don't build X backend
+DISABLE_FLAGS+= -DNO_X_BACKEND
+SRCS:= $(filter-out label_x.c, $(SRCS))
+
all: $(LIBA) $(LIBSO) $(LIBPC)
pywrap: all $(SWIGFILES) $(AUDIT2WHYSO)
diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
index 977b5c8c..d5c2e7c1 100644
--- a/libselinux/src/Makefile
+++ b/libselinux/src/Makefile
@@ -113,17 +113,6 @@ ifneq (,$(filter i386,$(ARCH)))
TLSFLAGS += -mno-tls-direct-seg-refs
endif
-ifeq ($(ANDROID_HOST),y)
-DISABLE_FLAGS+= -DNO_MEDIA_BACKEND -DNO_DB_BACKEND -DNO_X_BACKEND \
- -DBUILD_HOST
-SRCS= callbacks.c freecon.c label.c label_file.c \
- label_backends_android.c regex.c label_support.c \
- matchpathcon.c setrans_client.c sha1.c booleans.c
-else
-DISABLE_FLAGS+= -DNO_ANDROID_BACKEND
-SRCS:= $(filter-out label_backends_android.c, $(SRCS))
-endif
-
SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./ $(DISABLE_FLAGS)
SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(DISABLE_FLAGS)
......@@ -36,6 +36,8 @@ Group: System Environment/Libraries
Source: %{name}-%{version}.tar.bz2
Url: https://github.com/SELinuxProject/selinux/wiki
Patch1: ln_old_coreutils_libselinux.patch
Patch2: enable_android_backend.patch
Patch3: disable_x_backend.patch
BuildRequires: libsepol-static >= %{libsepolver}
BuildRequires: pcre-devel
BuildRequires: python
......@@ -111,6 +113,8 @@ needed for developing SELinux applications.
%prep
%setup -q -n %{name}-%{version}/upstream
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
# only build libsepol
......