зеркало из https://github.com/mozilla/pjs.git
added .spec file for building RPM - package is svrcore-devel - a script svrcore-config for getting cflag and ldflag information, and a .pc file for pkg-config
This commit is contained in:
Родитель
4952648fc0
Коммит
d22a816ef4
|
@ -1,100 +0,0 @@
|
|||
#! gmake
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape svrcore library.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1996, 1997
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#######################################################################
|
||||
# (1) Include initial platform-independent assignments (MANDATORY). #
|
||||
#######################################################################
|
||||
|
||||
include manifest.mn
|
||||
|
||||
#######################################################################
|
||||
# (2) Include "global" configuration information. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/config.mk
|
||||
|
||||
#######################################################################
|
||||
# (3) Include "component" configuration information. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
|
||||
|
||||
#######################################################################
|
||||
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
|
||||
#######################################################################
|
||||
|
||||
# Build only static library
|
||||
IMPORT_LIBRARY=
|
||||
SHARED_LIBRARY=
|
||||
|
||||
#######################################################################
|
||||
# (5) Execute "global" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
|
||||
#######################################################################
|
||||
# (6) Execute "component" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
#######################################################################
|
||||
|
||||
all release::
|
||||
@echo ---- Finished ----
|
||||
|
||||
coreconf_hack:
|
||||
cd ../coreconf; $(MAKE) export
|
||||
$(MAKE) import
|
||||
|
||||
RelEng_bld: coreconf_hack
|
||||
$(MAKE)
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
libs install:: ntsvrcore.res
|
||||
$(NSINSTALL) -m 444 $< $(SOURCE_LIB_DIR)
|
||||
|
||||
release_md::
|
||||
$(INSTALL) -m 444 ntsvrcore.res $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_LIB_DIR)
|
||||
endif
|
||||
|
||||
ntsvrcore.res: ntgetpin.rc
|
||||
rc -fo $@ -i. $<
|
|
@ -0,0 +1,11 @@
|
|||
prefix=%prefix%
|
||||
exec_prefix=%exec_prefix%
|
||||
libdir=%libdir%
|
||||
includedir=%includedir%
|
||||
|
||||
Name: svrcore-devel
|
||||
Description: Svrcore - development files for secure PIN handling using NSS crypto
|
||||
Version: %SVRCORE_VERSION%
|
||||
Requires: nspr >= %NSPR_VERSION% , nss >= %NSS_VERSION%
|
||||
Libs: -lsvrcore
|
||||
Cflags: -I${includedir}
|
|
@ -0,0 +1,139 @@
|
|||
%define nspr_version 4.6
|
||||
%define nss_version 3.11
|
||||
|
||||
Summary: Svrcore - development files for secure PIN handling using NSS crypto
|
||||
Name: svrcore-devel
|
||||
Version: 4.0.1
|
||||
Release: 1
|
||||
License: MPL/GPL/LGPL
|
||||
URL: http://www.mozilla.org/projects/security/pki/
|
||||
Group: Development/Libraries
|
||||
Requires: nspr-devel >= %{nspr_version}, nss-devel >= %{nspr_version}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: nspr-devel >= %{nspr_version}, nss-devel >= %{nss_version}
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: gawk
|
||||
Provides: svrcore-devel
|
||||
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
%description
|
||||
svrcore provides applications with several ways to handle secure PIN storage
|
||||
e.g. in an application that must be restarted, but needs the PIN to unlock
|
||||
the private key and other crypto material, without user intervention. svrcore
|
||||
uses the facilities provided by NSS.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
|
||||
# Enable compiler optimizations and disable debugging code
|
||||
BUILD_OPT=1
|
||||
export BUILD_OPT
|
||||
|
||||
# Generate symbolic info for debuggers
|
||||
XCFLAGS=$RPM_OPT_FLAGS
|
||||
export XCFLAGS
|
||||
|
||||
#export NSPR_INCLUDE_DIR=`nspr-config --includedir`
|
||||
#export NSPR_LIB_DIR=`nspr-config --libdir`
|
||||
|
||||
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
|
||||
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
|
||||
|
||||
export PKG_CONFIG_ALLOW_SYSTEM_LIBS
|
||||
export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
|
||||
|
||||
NSPR_INCLUDE_DIR=`/usr/bin/pkg-config --cflags-only-I nspr | sed 's/-I//'`
|
||||
|
||||
export NSPR_INCLUDE_DIR
|
||||
|
||||
NSS_INCLUDE_DIR=`/usr/bin/pkg-config --cflags-only-I nss | sed 's/-I//'`
|
||||
|
||||
export NSS_INCLUDE_DIR
|
||||
|
||||
%ifarch x86_64 ppc64 ia64 s390x
|
||||
USE_64=1
|
||||
export USE_64
|
||||
%endif
|
||||
|
||||
cd mozilla/security/svrcore
|
||||
# This make assumes the build is still using the mozilla/security/coreconf stuff,
|
||||
# which does all kinds of crazy stuff with copying files around, looking for
|
||||
# dependencies, etc.
|
||||
make EXPORTS="" RELEASE="" REQUIRES="" MODULE="" IMPORTS="" OBJDIR=. INSTALL=true
|
||||
|
||||
# Set up our package file
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
|
||||
%{__cat} svrcore.pc.in | sed -e "s,%%libdir%%,%{_libdir},g" \
|
||||
-e "s,%%prefix%%,%{_prefix},g" \
|
||||
-e "s,%%exec_prefix%%,%{_prefix},g" \
|
||||
-e "s,%%includedir%%,%{_includedir}/nss3,g" \
|
||||
-e "s,%%NSPR_VERSION%%,%{nspr_version},g" \
|
||||
-e "s,%%NSS_VERSION%%,%{nss_version},g" \
|
||||
-e "s,%%SVRCORE_VERSION%%,%{version},g" > \
|
||||
$RPM_BUILD_ROOT/%{_libdir}/pkgconfig/svrcore.pc
|
||||
|
||||
VMAJOR=`echo %{version}|cut -f1 -d.`
|
||||
VMINOR=`echo %{version}|cut -f2 -d.`
|
||||
VPATCH=`echo %{version}|cut -f3 -d.`
|
||||
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT/%{_bindir}
|
||||
%{__cat} svrcore-config.in | sed -e "s,@libdir@,%{_libdir},g" \
|
||||
-e "s,@prefix@,%{_prefix},g" \
|
||||
-e "s,@exec_prefix@,%{_prefix},g" \
|
||||
-e "s,@includedir@,%{_includedir},g" \
|
||||
-e "s,@MOD_MAJOR_VERSION@,$VMAJOR,g" \
|
||||
-e "s,@MOD_MINOR_VERSION@,$VMINOR,g" \
|
||||
-e "s,@MOD_PATCH_VERSION@,$VPATCH,g" \
|
||||
> $RPM_BUILD_ROOT/%{_bindir}/svrcore-config
|
||||
|
||||
chmod 755 $RPM_BUILD_ROOT/%{_bindir}/svrcore-config
|
||||
|
||||
|
||||
%install
|
||||
|
||||
# There is no make install target so we'll do it ourselves.
|
||||
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT/%{_includedir}
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT/%{_bindir}
|
||||
|
||||
cd mozilla/security/svrcore
|
||||
# Copy the binary libraries we want
|
||||
for file in libsvrcore.a
|
||||
do
|
||||
%{__install} -m 644 $file $RPM_BUILD_ROOT/%{_libdir}
|
||||
done
|
||||
|
||||
# Copy the include files
|
||||
for file in svrcore.h
|
||||
do
|
||||
%{__install} -m 644 $file $RPM_BUILD_ROOT/%{_includedir}
|
||||
done
|
||||
|
||||
|
||||
%clean
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%post
|
||||
/sbin/ldconfig >/dev/null 2>/dev/null
|
||||
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig >/dev/null 2>/dev/null
|
||||
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root)
|
||||
%{_libdir}/pkgconfig/svrcore.pc
|
||||
%{_libdir}/libsvrcore.a
|
||||
%attr(0755,root,root) %{_bindir}/svrcore-config
|
||||
%{_includedir}/svrcore.h
|
||||
|
||||
%changelog
|
||||
* Mon Dec 19 2005 Rich Megginson <rmeggins@redhat.com> - 4.01-1
|
||||
- Initial revision
|
||||
|
Загрузка…
Ссылка в новой задаче