tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Makefile (2841B)


      1 #
      2 # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
      3 # Use is subject to license terms.
      4 #
      5 # This Source Code Form is subject to the terms of the Mozilla Public
      6 # License, v. 2.0. If a copy of the MPL was not distributed with this
      7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
      8 #
      9 
     10 CORE_DEPTH = ../../..
     11 
     12 NAME        = sun-nss
     13 ifndef RPM_RELEASE
     14 RPM_RELEASE = 1
     15 endif
     16 VERSION     = `grep NSS_VERSION $(CORE_DEPTH)/../dist/public/nss/nss.h \
     17 	| head -1 \
     18 	| sed -e 's/[^"]*"//' -e 's/".*//' -e 's/ .*//'`
     19 PWD         = `pwd`
     20 BUILDROOT   = $(PWD)\/$(NAME)-root
     21 
     22 include $(CORE_DEPTH)/coreconf/config.mk
     23 
     24 # Force i386 for non 64 bit build
     25 ifneq ($(USE_64),1)
     26 RPMTARGET = "--target=i386"
     27 RPMLIBDIR = lib
     28 else
     29 RPMLIBDIR = lib64
     30 endif
     31 
     32 
     33 publish:
     34 $(MAKE) clean
     35 mkdir -p SOURCES SRPMS RPMS BUILD
     36 mkdir -p opt/sun/private/$(RPMLIBDIR) 
     37 find $(CORE_DEPTH)/../dist/$(OBJDIR)/lib -type l \
     38 	\( -name "*.so" -o -name "*.chk" \) \
     39 -exec cp {} opt/sun/private/$(RPMLIBDIR) \;
     40 rm -f opt/sun/private/$(RPMLIBDIR)/libnspr4.so \
     41    opt/sun/private/$(RPMLIBDIR)/libplc4.so \
     42    opt/sun/private/$(RPMLIBDIR)/libplds4.so \
     43    opt/sun/private/$(RPMLIBDIR)/libjss*.so
     44 mkdir -p opt/sun/private/bin
     45 (cd $(CORE_DEPTH)/../dist/$(OBJDIR)/bin && tar cphf - \
     46 	certutil cmsutil crlutil modutil pk12util signtool \
     47 	signver ssltap addbuiltin ) | (cd opt/sun/private/bin && tar xvfBp -)
     48 (cd $(CORE_DEPTH)/../dist/public && tar cphf - .) \
     49 	| (mkdir -p opt/sun/private/include && cd opt/sun/private/include && tar xvfBp -)
     50 rm -rf opt/sun/private/include/seccmd
     51 rm -rf opt/sun/private/include/dbm
     52 
     53 tar czvf $(NAME)-$(VERSION).tar.gz opt 
     54 echo "%define _topdir `pwd`" >temp.spec
     55 sed -e "s/NAME_REPLACE/$(NAME)/" \
     56 	-e "s/VERSION_REPLACE/$(VERSION)/" \
     57 	-e "s/RELEASE_REPLACE/$(RPM_RELEASE)/" \
     58 <$(NAME).spec >>temp.spec
     59 echo "" >>temp.spec
     60 echo "%files" >>temp.spec
     61 echo "%defattr(-,root,root)" >>temp.spec
     62 echo "%dir /opt" >>temp.spec
     63 echo "%dir /opt/sun" >>temp.spec
     64 echo "%dir /opt/sun/private" >>temp.spec
     65 echo "%dir /opt/sun/private/$(RPMLIBDIR)" >>temp.spec
     66 echo "%dir /opt/sun/private/bin" >>temp.spec
     67 find opt \( -name "*.so" -o -name "*.chk" -o -type f \
     68 	-perm u=rwx,g=rx,o=rx \) | sed -e "s-^-/-" >>temp.spec
     69 echo "" >>temp.spec
     70 echo "%files devel" >>temp.spec
     71 echo "%defattr(-,root,root)" >>temp.spec
     72 echo "%dir /opt" >>temp.spec
     73 echo "%dir /opt/sun" >>temp.spec
     74 echo "%dir /opt/sun/private" >>temp.spec
     75 echo "%dir /opt/sun/private/include" >>temp.spec
     76 echo "%dir /opt/sun/private/include/nss" >>temp.spec
     77 find opt -type f \( -name "*.h" \) \
     78 	| sed -e "s-^-/-" >>temp.spec
     79 cp $(NAME)-$(VERSION).tar.gz SOURCES
     80 rpmbuild $(RPMTARGET) -bb temp.spec
     81 
     82 clean::
     83 rm -rf SOURCES SRPMS RPMS BUILD
     84 rm -rf opt 
     85 rm -f temp.spec
     86 rm -f $(NAME)-$(VERSION).tar.gz
     87 
     88 include $(CORE_DEPTH)/coreconf/rules.mk