Add rpm packaging
authorWonYoung, Choi <wy80.choi@samsung.com>
Tue, 9 Aug 2011 08:08:37 +0000 (17:08 +0900)
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>
Wed, 20 Aug 2014 08:14:30 +0000 (10:14 +0200)
Change-Id: I5da6fd231ed8615bfb4a2b1ee96176c9426c41a2

packaging/libhangul.spec

index 28082de..742d891 100644 (file)
@@ -1,71 +1,95 @@
-Name:           libhangul
-Version:        0.1.0
-Release:        1
-License:        LGPLv2.1
-Group:          System/I18n/Korean
-AutoReqProv:    on
-Url:            http://code.google.com/p/libhangul
-Source0:        %{name}-%{version}.tar.gz
-Summary:        Hangul input library used by scim-hangul and ibus-hangul
-BuildRequires:  gettext-tools
+# >> macros
+# << macros
 
+Name:       libhangul
+Summary:    Hangul keyboard input library
+Version:    2.1.10
+Release:    2
+Group:      System/Libraries
+License:    TBD
+Source0:    %{name}-%{version}.tar.bz2
+Requires(post):  /sbin/ldconfig
+Requires(postun):  /sbin/ldconfig
 
-%description
-Hangul input library used by scim-hangul and ibus-hangul
+BuildRoot:  %{_tmppath}/%{name}-%{version}-build
 
+%description
+This library implements Hangul keyboard input with various types of Korean keyboards.  It is intended to be a base library of Korean input methods on multiple platforms.
+This package contains the shared library and the runtime data.
 
-Authors:
---------
-    Choe Hwanjin <choe.hwanjin@gmail.com>
-    Joon-cheol Park <jooncheol@gmail.com>
+%package data
+Summary:    Hangul keyboard input library - data
+Group:      System/Libraries
+Requires:   %{name} = %{version}-%{release}
 
-Hangul input library used by scim-hangul and ibus-hangul
+%description data
+This package contains the architecture independent data.
 
 
 %package devel
-Summary:        Include Files and Libraries mandatory for Development
-Group:          System/I18n/Korean
-Requires:       %{name} = %{version}-%{release}
+Summary:    Hangul keyboard input library - development files
+Group:      Development/Libraries
+Requires:   %{name} = %{version}-%{release}
 
 %description devel
-This package contains all necessary include files and libraries needed
-to develop applications that require these.
+This package contains the header files and the static library.
 
 
 %prep
-%setup -q
+%setup -q -n %{name}-%{version}
+
+# >> setup
+# << setup
 
 %build
-%autogen
-%configure --disable-static --with-pic
-%{__make} %{?jobs:-j%jobs}
+# >> build pre
+# << build pre
+
+%reconfigure --disable-static
 
+# Call make instruction with smp support
+make %{?jobs:-j%jobs}
+
+# >> build post
+# << build post
 %install
-make DESTDIR=${RPM_BUILD_ROOT} install
-%{__rm} -f %{buildroot}%{_libdir}/*.la
+rm -rf %{buildroot}
+# >> install pre
+# << install pre
+%make_install
+
+# >> install post
+# << install post
 
 %clean
 rm -rf %{buildroot}
 
-%post
-/sbin/ldconfig
 
-%postun
-/sbin/ldconfig
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
 
 %files
-%defattr(-, root, root)
-%doc AUTHORS COPYING NEWS README ChangeLog
-%{_libdir}/lib*.so.*
-%dir %{_datadir}/libhangul/
-%dir %{_datadir}/libhangul/hanja/
-%{_datadir}/libhangul/hanja/hanja.txt
-%{_bindir}/hangul
-%{_datadir}/locale/ko/LC_MESSAGES/libhangul.mo
+%defattr(-,root,root,-)
+# >> files
+%{_libdir}/lib*.so*
+# << files
+
+
+%files data
+%defattr(-,root,root,-)
+# >> files
+%{_datadir}/libhangul/*
+# << files
+
 
 %files devel
-%defattr(-, root, root)
-%dir /usr/include/hangul-1.0/
-/usr/include/hangul-1.0/*
-%{_libdir}/lib*.so
-%{_libdir}/pkgconfig/libhangul.pc
+%defattr(-,root,root,-)
+# >> files devel
+%{_includedir}/hangul-1.0/*.h
+%{_libdir}/pkgconfig/*.pc
+# << files devel
+