Apply directory macros and intall license file to the proper directory
authorSung-Jin Park <sj76.park@samsung.com>
Mon, 29 Aug 2016 08:56:37 +0000 (17:56 +0900)
committerjeon <jhyuni.kang@samsung.com>
Thu, 7 Jan 2021 11:36:38 +0000 (20:36 +0900)
Change-Id: I8c2f82f17e13b1b7dd540dd037c32495d124c0c8

packaging/mtdev.spec

index 22d9e4b..a891818 100644 (file)
@@ -9,6 +9,8 @@ Source:         http://bitmath.org/code/mtdev/mtdev-%{version}.tar.bz2
 Source1001:     mtdev.manifest
 BuildRequires:  pkgconfig
 
+%global TZ_SYS_RO_SHARE  %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
+
 %description
 The mtdev is a stand-alone library which transforms all variants of kernel MT events to the slotted type B protocol. The events put into mtdev may be from any MT device, specifically type A without contact tracking, type A with contact tracking, or type B with contact tracking. See the kernel documentation for further details.
 
@@ -39,6 +41,10 @@ cp %{SOURCE1001} .
 %install
 %make_install
 
+#for license notification
+mkdir -p %{buildroot}/%{TZ_SYS_RO_SHARE}/license
+cp -a %{_builddir}/%{buildsubdir}/COPYING %{buildroot}/%{TZ_SYS_RO_SHARE}/license/%{name}
+
 %post -n libmtdev -p /sbin/ldconfig
 
 %postun -n libmtdev -p /sbin/ldconfig
@@ -46,7 +52,7 @@ cp %{SOURCE1001} .
 %files
 %manifest %{name}.manifest
 %defattr(-, root, root)
-%license COPYING 
+%{TZ_SYS_RO_SHARE}/license/%{name}
 %{_bindir}/*
 
 %files -n libmtdev