Version: %{WL_EGL_VERSION}
Release: 0
Summary: Development header files for use with Wayland protocol
-Requires: libwayland-egl
+Requires: libwayland-egl
%description -n libwayland-egl-devel
Development header files for use with Wayland protocol
#libwayland-egl build
%if "%{TPL_WINSYS}" == "WL"
cd src/wayland-egl
-export WL_EGL_SO_VER=%{WL_EGL_VERSION}
+export WL_EGL_VERSION_MAJOR=%{WL_EGL_VERSION_MAJOR}
+export WL_EGL_VERSION_MINOR=%{WL_EGL_VERSION_MINOR}
+export WL_EGL_VERSION_PATCH=%{WL_EGL_VERSION_PATCH}
make
cd ../../
%endif
make install libdir=%{buildroot}%{_libdir}
-ln -sf libtpl-egl.so.%{TPL_VERSION} %{buildroot}%{_libdir}/libtpl-egl.so.%{TPL_VERSION_MAJOR}.%{TPL_VERSION_MINOR}
-ln -sf libtpl-egl.so.%{TPL_VERSION_MAJOR}.%{TPL_VERSION_MINOR} %{buildroot}%{_libdir}/libtpl-egl.so.%{TPL_VERSION_MAJOR}
-ln -sf libtpl-egl.so.%{TPL_VERSION_MAJOR} %{buildroot}%{_libdir}/libtpl-egl.so
+ln -sf libtpl-egl.so.%{TPL_VERSION} %{buildroot}%{_libdir}/libtpl-egl.so
cp -a src/tpl.h %{buildroot}%{_includedir}/
cp -a pkgconfig/tpl-egl.pc %{buildroot}%{_libdir}/pkgconfig/
%if "%{TPL_WINSYS}" == "WL"
cd src/wayland-egl
-cp libwayland-egl.so.%{WL_EGL_VERSION} %{buildroot}%{_libdir}/libwayland-egl.so
-cp libwayland-egl.so.%{WL_EGL_VERSION} %{buildroot}%{_libdir}/libwayland-egl.so.%{WL_EGL_VERSION_MAJOR}
-cp libwayland-egl.so.%{WL_EGL_VERSION} %{buildroot}%{_libdir}/libwayland-egl.so.%{WL_EGL_VERSION_MAJOR}.%{WL_EGL_VERSION_MINOR}
-export WL_EGL_SO_VER=%{WL_EGL_VERSION}
+ln -sf libwayland-egl.so.%{WL_EGL_VERSION} %{buildroot}%{_libdir}/libwayland-egl.so
+export WL_EGL_VERSION_MAJOR=%{WL_EGL_VERSION_MAJOR}
+export WL_EGL_VERSION_MINOR=%{WL_EGL_VERSION_MINOR}
+export WL_EGL_VERSION_PATCH=%{WL_EGL_VERSION_PATCH}
%makeinstall
cd -
%manifest packaging/libtpl-egl.manifest
%license COPYING
%defattr(-,root,root,-)
-%{_libdir}/libtpl-egl.so
-%{_libdir}/libtpl-egl.so.%{TPL_VERSION_MAJOR}
-%{_libdir}/libtpl-egl.so.%{TPL_VERSION_MAJOR}.%{TPL_VERSION_MINOR}
%{_libdir}/libtpl-egl.so.%{TPL_VERSION}
%if "%{ENABLE_WORKER_TEST_ONLY}" == "1"
%defattr(-,root,root,-)
%{_includedir}/tpl.h
%{_libdir}/pkgconfig/tpl-egl.pc
+%{_libdir}/libtpl-egl.so
%if "%{TPL_WINSYS}" == "WL"
%files -n libwayland-egl
%manifest packaging/libwayland-egl.manifest
%license COPYING
%defattr(-,root,root,-)
-%{_libdir}/libwayland-egl.so
-%{_libdir}/libwayland-egl.so.%{WL_EGL_VERSION_MAJOR}
-%{_libdir}/libwayland-egl.so.%{WL_EGL_VERSION_MAJOR}.%{WL_EGL_VERSION_MINOR}
%{_libdir}/libwayland-egl.so.%{WL_EGL_VERSION}
%files -n libwayland-egl-devel
%defattr(-,root,root,-)
+%{_libdir}/libwayland-egl.so
%{_libdir}/pkgconfig/wayland-egl.pc
%endif
-WL_EGL_SO_VER ?= no_ver
+WL_EGL_SO_NAME = libwayland-egl.so.$(WL_EGL_VERSION_MAJOR)
+WL_EGL_BIN_NAME = $(WL_EGL_SO_NAME).$(WL_EGL_VERSION_MINOR).$(WL_EGL_VERSION_PATCH)
SRC_DIR = ./
#CROSS_COMPILE ?= arm-none-linux-gnueabi-
WAYLAND_EGL_SRCS += \
$(SRC_DIR)/wayland-egl.c
-%.o: %.c
- $(TARGET_CC) -c -o $@ $< $(CFLAGS)
-
WAYLAND_EGL_OBJS := $(WAYLAND_EGL_SRCS:.c=.o)
-libwayland-egl.so.$(WL_EGL_SO_VER): $(WAYLAND_EGL_OBJS)
- $(TARGET_CC) -shared -o $@ $(WAYLAND_EGL_OBJS) $(CFLAGS)
+all: $(WL_EGL_BIN_NAME)
+
+$(WL_EGL_BIN_NAME) : $(WAYLAND_EGL_OBJS)
+ $(TARGET_CC) -o $@ $(WAYLAND_EGL_OBJS) -shared -Wl,-soname,$(WL_EGL_SO_NAME) $(CFLAGS)
+
+%.o: %.c
+ $(TARGET_CC) -c -o $@ $< $(CFLAGS)
.DEFAULT_GOAL = all
-all: libwayland-egl.so.$(WL_EGL_SO_VER)
clean:
- -rm -f $(WAYLAND_EGL_OBJS) libwayland-egl.so.$(WL_EGL_SO_VER)
+ -rm -f $(WAYLAND_EGL_OBJS) $(WL_EGL_BIN_NAME)
install: all
cp ../../pkgconfig/wayland-egl.pc $(libdir)/pkgconfig/
- cp libwayland-egl.so.$(WL_EGL_SO_VER) $(libdir)/
+ cp $(WL_EGL_BIN_NAME) $(libdir)/
uninstall:
-rm -f $(libdir)/pkgconfig/wayland-egl.pc
- -rm -f $(libdir)/libwayland-egl.so.$(WL_EGL_SO_VER)
+ -rm -f $(libdir)/$(WL_EGL_BIN_NAME)