diff options
author | saul.edwards%sun.com <devnull@localhost> | 2003-12-01 20:34:58 +0000 |
---|---|---|
committer | saul.edwards%sun.com <devnull@localhost> | 2003-12-01 20:34:58 +0000 |
commit | 3dd95f18b0ea5122631e2ec5b2add1cf879dc825 (patch) | |
tree | a8e424395ce96677da98acb5bed405d97e4cfd82 | |
parent | 80687e81c684bf952d7efc8c4394fac84cd694f1 (diff) | |
download | nss-hg-3dd95f18b0ea5122631e2ec5b2add1cf879dc825.tar.gz |
Add RPM packaging a la Kirk.
-rw-r--r-- | security/nss/Makefile | 10 | ||||
-rw-r--r-- | security/nss/pkg/linux/Makefile | 28 | ||||
-rw-r--r-- | security/nss/pkg/linux/sun-nss.spec | 5 |
3 files changed, 19 insertions, 24 deletions
diff --git a/security/nss/Makefile b/security/nss/Makefile index 21a54fbe5..89992328e 100644 --- a/security/nss/Makefile +++ b/security/nss/Makefile @@ -110,10 +110,6 @@ endif nss_RelEng_bld: build_coreconf import all -ifeq ($(OS_ARCH),SunOS) -solarispkg: - @echo Making Solaris packages. - rm -rf pkg/$(OBJDIR) - cp -r pkg/solaris pkg/$(OBJDIR) - $(MAKE) -C pkg/$(OBJDIR) publish -endif +package: + $(MAKE) -C pkg publish + diff --git a/security/nss/pkg/linux/Makefile b/security/nss/pkg/linux/Makefile index f25d09f71..842444ae1 100644 --- a/security/nss/pkg/linux/Makefile +++ b/security/nss/pkg/linux/Makefile @@ -9,25 +9,28 @@ CORE_DEPTH = ../../.. NAME = sun-nss RELEASE = 1 -TOPDIR = /usr/src/redhat -VERSION = `grep NSS_VERSION $(CORE_DEPTH)/../dist/public/nss/nss.h \ - | sed -e 's/"$$//' -e 's/.*"//' -e 's/ .*//'` +VERSION = `grep NSS_VERSION $(CORE_DEPTH)/../dist/public/security/nss.h \ + | sed -e 's/"$$//' -e 's/.*"//' -e 's/ .*//'` +PWD = `pwd` +BUILDROOT = $(PWD)\/$(NAME)-root include $(CORE_DEPTH)/coreconf/config.mk publish: $(MAKE) clean + mkdir -p SOURCES SRPMS RPMS BUILD mkdir -p usr/lib/mps find $(CORE_DEPTH)/../dist/$(OBJDIR)/lib -type l \ \( -name "*.so" -o -name "*.chk" \) \ - -exec cp -L {} usr/lib/mps \; - mkdir -p usr/include/mps - cp -Lr $(CORE_DEPTH)/../dist/public/* usr/include/mps + -exec cp {} usr/lib/mps \; + (cd $(CORE_DEPTH)/../dist/public && tar cphf - .) \ + | (mkdir -p usr/include/mps && cd usr/include/mps && tar xvfBp -) tar czvf $(NAME)-$(VERSION).tar.gz usr + echo "%define _topdir `pwd`" >temp.spec sed -e "s/NAME_REPLACE/$(NAME)/" \ -e "s/VERSION_REPLACE/$(VERSION)/" \ -e "s/RELEASE_REPLACE/$(RELEASE)/" \ - <$(NAME).spec >temp.spec + <$(NAME).spec >>temp.spec echo "" >>temp.spec echo "%files" >>temp.spec echo "%defattr(-,root,root)" >>temp.spec @@ -42,17 +45,12 @@ publish: find usr -type d | sed -e "s-^-%dir /-" >>temp.spec find usr -type f ! \( -name "*.so" -o -name "*.chk" \) \ | sed -e "s-^-/-" >>temp.spec - cp $(NAME)-$(VERSION).tar.gz $(TOPDIR)/SOURCES + cp $(NAME)-$(VERSION).tar.gz SOURCES rpm -ba temp.spec - if [ ! -d RPMS ] ; then mkdir -p RPMS ; fi - if [ ! -d SRPMS ] ; then mkdir -p SRPMS ; fi - cp -v $(TOPDIR)/RPMS/i386/$(NAME)-$(VERSION)-* RPMS - cp -v $(TOPDIR)/RPMS/i386/$(NAME)-devel-$(VERSION)-* RPMS - cp -v $(TOPDIR)/SRPMS/$(NAME)-$(VERSION)-* SRPMS clean:: - rm -rf $(TOPDIR)/BUILD/$(NAME) - rm -rf RPMS SRPMS usr + rm -rf SOURCES SRPMS RPMS BUILD + rm -rf usr rm -f temp.spec rm -f $(NAME)-$(VERSION).tar.gz diff --git a/security/nss/pkg/linux/sun-nss.spec b/security/nss/pkg/linux/sun-nss.spec index 1c3563332..94457b87a 100644 --- a/security/nss/pkg/linux/sun-nss.spec +++ b/security/nss/pkg/linux/sun-nss.spec @@ -7,8 +7,9 @@ Copyright: MPL/GPL Group: System Environment/Base Source: %{name}-%{version}.tar.gz ExclusiveOS: Linux -BuildRoot: /var/tmp/%{name}-root -Requires: sun-nspr >= 4.3 +BuildRoot: %_topdir/%{name}-root + +Requires: sun-nspr >= 4.1.2 %description Network Security Services (NSS) is a set of libraries designed |