Reorganized the directory structure
This commit is contained in:
		
							
								
								
									
										118
									
								
								pkgs/qse.spec.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										118
									
								
								pkgs/qse.spec.in
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,118 @@ | ||||
| %define _prefix /usr | ||||
| %define _sysconfdir /etc | ||||
|  | ||||
| %define _nowidechar_prefix /opt/qse-nowidechar | ||||
| %define _nowidechar_libdir %{_nowidechar_prefix}/%{_lib} | ||||
|  | ||||
| Summary: QSE Library | ||||
| Name: @PACKAGE_NAME@ | ||||
| Version: @PACKAGE_VERSION@ | ||||
| Release: 1%{?dist} | ||||
| License: Simplified BSD License | ||||
| Vendor: Chung, Hyung-Hwan  | ||||
| URL: @PACKAGE_URL@ | ||||
| Group: System Environment/Libraries | ||||
| Source0: %{name}-%{version}.tar.gz | ||||
| #Requires:  | ||||
|  | ||||
| #BuildRequires:  | ||||
| BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | ||||
| #BuildPrereq: | ||||
|  | ||||
| %description | ||||
| QSE Library | ||||
|  | ||||
| %package devel | ||||
| Summary: Development files for QSE | ||||
| Group: System Environment/Libraries | ||||
| Requires: @PACKAGE_NAME@ = %{version} | ||||
|  | ||||
| %description devel | ||||
| The header files and libraries for developing applications with QSE. | ||||
|  | ||||
| %package nowidechar | ||||
| Summary: Development files for QSE Non-Widechar | ||||
| Group: System Environment/Libraries | ||||
|  | ||||
| %description nowidechar | ||||
| The header files and libraries for developing applications with QSE Non-Widechar. | ||||
| The nowidecharchar version is retained for building legacy applications. | ||||
|  | ||||
| %prep | ||||
| %setup -q | ||||
|  | ||||
| %build | ||||
| RPM_OPT_FLAGS="$(echo $RPM_OPT_FLAGS | %{__sed} 's/-O2/-O3/')" | ||||
| #CFLAGS="${RPM_OPT_FLAGS} -D_GNU_SOURCE" CXXFLAGS="${RPM_OPT_FLAGS} -D_GNU_SOURCE" ./configure --prefix=%{_prefix} --libdir=%{_libdir} --sysconfdir=%{_sysconfdir} --enable-shared=no --enable-static=no --enable-wide-char=yes:2w --enable-syscall=no --enable-cxx=yes --enable-pthread_flags=yes | ||||
|  | ||||
| mkdir bld-wide | ||||
| pushd bld-wide | ||||
| CFLAGS="${RPM_OPT_FLAGS}" CXXFLAGS="${RPM_OPT_FLAGS}" ../configure \ | ||||
| 	--prefix=%{_prefix} \ | ||||
| 	--libdir=%{_libdir} \ | ||||
| 	--sysconfdir=%{_sysconfdir} \ | ||||
| 	--enable-shared=no \ | ||||
| 	--enable-static=yes \ | ||||
| 	--enable-wide-char=yes \ | ||||
| 	--enable-bundled-unicode=no \ | ||||
| 	--enable-xcmgrs=yes \ | ||||
| 	--enable-syscall=no \ | ||||
| 	--enable-debug=no \ | ||||
| 	--enable-cxx=yes \ | ||||
| 	--enable-pthread_flags=yes  ##CC=gcc44 CXX=g++44 | ||||
| make | ||||
| popd | ||||
|  | ||||
| mkdir bld-no-wide | ||||
| pushd bld-no-wide | ||||
| CFLAGS="${RPM_OPT_FLAGS}" CXXFLAGS="${RPM_OPT_FLAGS}" ../configure \ | ||||
| 	--prefix=%{_nowidechar_prefix} \ | ||||
| 	--libdir=%{_nowidechar_libdir} \ | ||||
| 	--enable-shared=no \ | ||||
| 	--enable-static=yes \ | ||||
| 	--enable-wide-char=no \ | ||||
| 	--enable-bundled-unicode=no \ | ||||
| 	--enable-xcmgrs=yes \ | ||||
| 	--enable-syscall=no \ | ||||
| 	--enable-debug=no \ | ||||
| 	--enable-cxx=yes \ | ||||
| 	--enable-pthread_flags=yes  ##CC=gcc44 CXX=g++44 | ||||
| make | ||||
| popd | ||||
|  | ||||
| %install | ||||
| pushd bld-wide | ||||
| make install DESTDIR=$RPM_BUILD_ROOT | ||||
| popd | ||||
|  | ||||
| pushd bld-no-wide | ||||
| make install DESTDIR=$RPM_BUILD_ROOT | ||||
| popd | ||||
|  | ||||
| ##rm -f $RPM_BUILD_ROOT%{_libdir}/*.la | ||||
| rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig | ||||
| rm -rf $RPM_BUILD_ROOT%{_nowidechar_libdir}/pkgconfig | ||||
|  | ||||
| %clean | ||||
| rm -rf "$RPM_BUILD_ROOT" | ||||
|  | ||||
| %post | ||||
| /sbin/ldconfig | ||||
|  | ||||
| %postun | ||||
| /sbin/ldconfig | ||||
|  | ||||
| %files | ||||
| %defattr(-,root,root) | ||||
| %{_bindir}/* | ||||
| %{_sysconfdir}/qse/* | ||||
|  | ||||
| %files devel | ||||
| %defattr(-,root,root) | ||||
| %{_includedir}/* | ||||
| %{_libdir}/*.a | ||||
| %{_libdir}/*.la | ||||
|  | ||||
| %files nowidechar | ||||
| %defattr(-,root,root) | ||||
| %{_nowidechar_prefix}/* | ||||
		Reference in New Issue
	
	Block a user