зеркало из https://github.com/mozilla/pjs.git
Bump spec rev to 3
Remove unneeded buildrequires perl, gawk, sed Remove leading / from path macros Remove provides for package name - done automatically Move pkgconfig file stuff under install Added LICENSE and README under docs
This commit is contained in:
Родитель
407bc038ef
Коммит
f7791eab15
|
@ -1,191 +0,0 @@
|
|||
#!/bin/sh
|
||||
# ***** 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
|
||||
# Red Hat
|
||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Rich Megginson <richm@stanfordalumni.org>
|
||||
#
|
||||
# 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 *****
|
||||
# This script can be used to build the svrcore-devel rpm and srpm. It assumes
|
||||
# you begin with nothing but this script. You must have nspr, nspr-devel,
|
||||
# nss, and nss-devel installed on your system in order to run this script. Not
|
||||
# only will the script check, but the rpmbuild will also check and bomb out if
|
||||
# those dependencies are not present. The script allows you to build the rpm
|
||||
# as a non root user and puts the build files under the current directory. This
|
||||
# script does not install the rpm.
|
||||
#
|
||||
# You may need to edit this script to change:
|
||||
# the versions of nspr and nss used
|
||||
# the CVS tag for pulling svrcore
|
||||
# the svrcore version and release - these should match the spec file
|
||||
|
||||
# Always switch into the base directory of this
|
||||
# shell script prior to executing it so that all
|
||||
# of its output is written to this directory
|
||||
cd `dirname $0`
|
||||
|
||||
# This script may ONLY be run on Linux!
|
||||
OS=`uname`
|
||||
if [ ${OS} != "Linux" ]; then
|
||||
echo "The '$0' script is ONLY executable on a 'Linux' machine!"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# This script may ONLY be executed on either
|
||||
# an 'i386' platform or an 'x86_64' platform!
|
||||
PLATFORM=`uname -i`
|
||||
if [ ${PLATFORM} = "i386" ]; then
|
||||
BITSIZE=32-bit
|
||||
elif [ ${PLATFORM} = "x86_64" ]; then
|
||||
BITSIZE=64-bit
|
||||
else
|
||||
echo "The '$0' script is ONLY executable on either"
|
||||
echo "an 'i386' platform or an 'x86_64' platform!"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# initialize environment variables for this script
|
||||
unset LD_LIBRARY_PATH
|
||||
|
||||
CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
|
||||
export CVSROOT
|
||||
|
||||
# define the remaining variables
|
||||
PACKAGE=svrcore-devel
|
||||
VERSION=4.0.2
|
||||
RELEASE=2
|
||||
SVRCORE_TAG=SVRCORE_4_0_2_RTM
|
||||
SVRCORE_CORECONF_TAG=$SVRCORE_TAG
|
||||
PRJ=${PACKAGE}-${VERSION}
|
||||
RPM_HOME=`pwd`
|
||||
SPEC_FILENAME=${PACKAGE}.spec
|
||||
|
||||
# define subroutines for this script
|
||||
usage() {
|
||||
echo
|
||||
echo "Usage: $0"
|
||||
echo
|
||||
}
|
||||
|
||||
mkdirs() {
|
||||
for d in "$@" ; do
|
||||
if [ -d $d ]; then
|
||||
mv $d $d.deleted
|
||||
rm -rf $d.deleted &
|
||||
fi
|
||||
mkdir -p $d
|
||||
done
|
||||
}
|
||||
|
||||
# check the number of arguments supplied to this script
|
||||
if [ $# -ne 0 ] ; then
|
||||
usage
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# remove any old RPM directories
|
||||
echo "Removing any old RPM directories . . ."
|
||||
if [ -d ${RPM_HOME}/BUILD ]; then
|
||||
rm -rf ${RPM_HOME}/BUILD
|
||||
fi
|
||||
if [ -d ${RPM_HOME}/SOURCES ]; then
|
||||
rm -rf ${RPM_HOME}/SOURCES
|
||||
fi
|
||||
if [ -d ${RPM_HOME}/SPECS ]; then
|
||||
rm -rf ${RPM_HOME}/SPECS
|
||||
fi
|
||||
echo "Finished."
|
||||
|
||||
echo "Changing current working directory to ${RPM_HOME}."
|
||||
cd ${RPM_HOME}
|
||||
|
||||
# create new RPM directories
|
||||
echo "Creating new RPM directories . . ."
|
||||
mkdirs BUILD
|
||||
if [ ! -d ${RPM_HOME}/RPMS ]; then
|
||||
mkdirs ${RPM_HOME}/RPMS
|
||||
fi
|
||||
mkdirs SOURCES SPECS
|
||||
if [ ! -d ${RPM_HOME}/SRPMS ]; then
|
||||
mkdirs ${RPM_HOME}/SRPMS
|
||||
fi
|
||||
echo "Finished."
|
||||
|
||||
# check out SVRCORE CORECONF code
|
||||
echo "Checking out SVRCORE CORECONF source code . . ."
|
||||
cvs -z3 -Q export -r ${SVRCORE_CORECONF_TAG} -d ${PRJ} -N mozilla/security/coreconf
|
||||
echo "Finished."
|
||||
|
||||
# check out SVRCORE code
|
||||
echo "Checking out SVRCORE source code . . ."
|
||||
cvs -z3 -Q export -r ${SVRCORE_TAG} -d ${PRJ} -N mozilla/security/svrcore
|
||||
echo "Finished."
|
||||
|
||||
# create a tarball from the checked out code
|
||||
echo "Creating tarball of SVRCORE source code . . ."
|
||||
tar cf - ${PRJ} | gzip > SOURCES/${PRJ}.tar.gz
|
||||
echo "Finished."
|
||||
|
||||
# remove the checked out code
|
||||
echo "Removing checked out SVRCORE source code . . ."
|
||||
rm -rf ${PRJ}
|
||||
echo "Finished."
|
||||
|
||||
# copy spec file
|
||||
cp ${SPEC_FILENAME} SPECS/${SPEC_FILENAME}
|
||||
|
||||
# build the ${BITSIZE} RPM and Source RPM
|
||||
echo "Executing ${BITSIZE} rpmbuild of ${SPEC_FILENAME} file . . . "
|
||||
if [ ! -f SRPMS/${PACKAGE}-${VERSION}-${RELEASE}.src.rpm ]; then
|
||||
rpmbuild --define="_topdir ${RPM_HOME}" --target ${PLATFORM} -ba --clean --rmspec SPECS/${SPEC_FILENAME}
|
||||
else
|
||||
rpmbuild --define="_topdir ${RPM_HOME}" --target ${PLATFORM} -bb --clean --rmspec SPECS/${SPEC_FILENAME}
|
||||
fi
|
||||
echo "Finished doing ${BITSIZE} rpmbuild of ${SPEC_FILENAME} file."
|
||||
|
||||
echo "Removing BUILD directory . . ."
|
||||
if [ -d ${RPM_HOME}/BUILD ]; then
|
||||
rm -rf ${RPM_HOME}/BUILD
|
||||
fi
|
||||
echo "Finished."
|
||||
|
||||
#echo "Removing SOURCES directory . . ."
|
||||
#if [ -d ${RPM_HOME}/SOURCES ]; then
|
||||
# rm -rf ${RPM_HOME}/SOURCES
|
||||
#fi
|
||||
#echo "Finished."
|
||||
|
||||
echo "Removing SPECS directory . . ."
|
||||
if [ -d ${RPM_HOME}/SPECS ]; then
|
||||
rm -rf ${RPM_HOME}/SPECS
|
||||
fi
|
||||
echo "Finished."
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
%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.2
|
||||
Release: 2%{?dist}
|
||||
License: MPL/GPL/LGPL
|
||||
URL: http://www.mozilla.org/projects/security/pki/
|
||||
Group: Development/Libraries
|
||||
Requires: nspr-devel >= %{nspr_version}
|
||||
Requires: nss-devel >= %{nss_version}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: nspr-devel >= %{nspr_version}
|
||||
BuildRequires: nss-devel >= %{nss_version}
|
||||
BuildRequires: gawk
|
||||
BuildRequires: perl
|
||||
BuildRequires: sed
|
||||
BuildRequires: pkgconfig
|
||||
Provides: svrcore-devel
|
||||
|
||||
Source0: ftp://ftp.mozilla.org/pub/mozilla.org/directory/svrcore/releases/4.0.2/%{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
|
||||
|
||||
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 --variable=includedir nspr`
|
||||
export NSPR_INCLUDE_DIR
|
||||
|
||||
NSS_INCLUDE_DIR=`/usr/bin/pkg-config --variable=includedir nss`
|
||||
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},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/%{name}.pc
|
||||
|
||||
%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}
|
||||
|
||||
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
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root)
|
||||
%{_libdir}/pkgconfig/%{name}.pc
|
||||
%{_libdir}/libsvrcore.a
|
||||
%{_includedir}/svrcore.h
|
||||
|
||||
%changelog
|
||||
* Mon Jun 26 2006 Rich Megginson <rmeggins@redhat.com> - 4.0.2-2
|
||||
- Bump spec rev to 2 due to change of spec file name from svrcore
|
||||
- to svrcore-devel to comply with fedora packaging guidelines
|
||||
|
||||
* Thu Jun 22 2006 Rich Megginson <rmeggins@redhat.com> - 4.0.2-1
|
||||
- Bump rev to 4.0.2; now using HEAD of mozilla/security/coreconf
|
||||
- which includes the coreconf-location.patch, so got rid of patch
|
||||
|
||||
* Tue Apr 18 2006 Rich Megginson <rmeggins@redhat.com> - 4.0.1-3
|
||||
- Use pkg-config --variable=includedir to get include dirs
|
||||
|
||||
* Wed Feb 1 2006 Rich <rmeggins@redhat.com> - 4.0.1-2
|
||||
- Requires nss version was wrong
|
||||
|
||||
* Wed Jan 11 2006 Rich Megginson <rmeggins@redhat.com> - 4.01-1
|
||||
- Removed svrcore-config - use pkg-config instead
|
||||
|
||||
* Mon Dec 19 2005 Rich Megginson <rmeggins@redhat.com> - 4.01-1
|
||||
- Initial revision
|
Загрузка…
Ссылка в новой задаче