makefile.mk (3f7853c2) makefile.mk (5f883a58)
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 27 unchanged lines hidden (view full) ---

36# --- Product Version Information ----------------------------------
37
38.INCLUDE : ../productversion.mk
39
40# --- Files --------------------------------------------------------
41
42.IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/deb//)"
43
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 27 unchanged lines hidden (view full) ---

36# --- Product Version Information ----------------------------------
37
38.INCLUDE : ../productversion.mk
39
40# --- Files --------------------------------------------------------
41
42.IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/deb//)"
43
44DEBFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i3.4-$(TARGET)-menus_$(PKGVERSION.$i)-$(PKGREV)_all.deb)
44DEBFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i3.5-$(TARGET)-menus_$(PKGVERSION.$i)-$(PKGREV)_all.deb)
45
46.ENDIF
47
48# --- Targets -------------------------------------------------------
49
50.INCLUDE : target.mk
51
52.IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/deb//)"
53
54ALLTAR : $(DEBFILES)
55
56
57%/DEBIAN/control : $$(@:f)
58 @$(MKDIRHIER) $(@:d) $*$/etc $*$/usr/share/applnk/Office $*$/usr/lib/menu
45
46.ENDIF
47
48# --- Targets -------------------------------------------------------
49
50.INCLUDE : target.mk
51
52.IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/deb//)"
53
54ALLTAR : $(DEBFILES)
55
56
57%/DEBIAN/control : $$(@:f)
58 @$(MKDIRHIER) $(@:d) $*$/etc $*$/usr/share/applnk/Office $*$/usr/lib/menu
59 ln -sf /opt/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.4//)) $*$/etc$/
60 /bin/sh -c -x "cd $(COMMONMISC)$/$(*:f:s/-/ /:1:s/3.4//) && DESTDIR=$(shell @cd $*; pwd) ICON_PREFIX=$(ICONPREFIX) KDEMAINDIR=/usr GNOMEDIR=/usr create_tree.sh"
61 @cat openoffice.org-debian-menus | sed -e 's/%PRODUCTNAME/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/3.4//)) $(PRODUCTVERSION.$(*:f:s/-/ /:1:s/3.4//))/' -e 's/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.4//))/' -e 's/%ICONPREFIX/$(ICONPREFIX.$(*:f:s/-/ /:1:s/3.4//))/' > $*$/usr/lib/menu/$(*:f:s/_/ /:1:s/3.4//)
62 echo "Package: $(*:f:s/_/ /:1:s/3.4//)" > $@
63 cat $(@:f) | tr -d "\015" | sed "s/%productname/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/3.4//))/" >> $@
64 echo "Version: $(PKGVERSION.$(*:f:s/-/ /:1:s/3.4//))-$(PKGREV)" >> $@
59 ln -sf /opt/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.5//)) $*$/etc$/
60 /bin/sh -c -x "cd $(COMMONMISC)$/$(*:f:s/-/ /:1:s/3.5//) && DESTDIR=$(shell @cd $*; pwd) ICON_PREFIX=$(ICONPREFIX) KDEMAINDIR=/usr GNOMEDIR=/usr create_tree.sh"
61 @cat openoffice.org-debian-menus | sed -e 's/%PRODUCTNAME/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/3.5//)) $(PRODUCTVERSION.$(*:f:s/-/ /:1:s/3.5//))/' -e 's/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.5//))/' -e 's/%ICONPREFIX/$(ICONPREFIX.$(*:f:s/-/ /:1:s/3.5//))/' > $*$/usr/lib/menu/$(*:f:s/_/ /:1:s/3.5//)
62 echo "Package: $(*:f:s/_/ /:1:s/3.5//)" > $@
63 cat $(@:f) | tr -d "\015" | sed "s/%productname/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/3.5//))/" >> $@
64 echo "Version: $(PKGVERSION.$(*:f:s/-/ /:1:s/3.5//))-$(PKGREV)" >> $@
65 @du -k -s $* | awk -F ' ' '{ printf "Installed-Size: %s\n", $$1 ; }' >> $@
66
67%/DEBIAN/postinst : $$(@:f)
65 @du -k -s $* | awk -F ' ' '{ printf "Installed-Size: %s\n", $$1 ; }' >> $@
66
67%/DEBIAN/postinst : $$(@:f)
68 @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.4//))/g" > $@
68 @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.5//))/g" > $@
69
70%/DEBIAN/postrm : $$(@:f)
69
70%/DEBIAN/postrm : $$(@:f)
71 @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.4//))/g" > $@
71 @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.5//))/g" > $@
72
73%/DEBIAN/prerm : $$(@:f)
72
73%/DEBIAN/prerm : $$(@:f)
74 @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.4//))/g" > $@
74 @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.5//))/g" > $@
75
76# --- packaging ---------------------------------------------------
77
78# getuid.so fakes the user/group for us
79$(DEBFILES) : $(COMMONMISC)$/{$(PRODUCTLIST)}$/build.flag
80$(DEBFILES) : makefile.mk control postinst postrm prerm
81 -$(RM) $(@:d)$(@:f:s/_/ /:1)_*
82 $(RM) -r $(MISC)$/$(@:b)
83 dmake $(MISC)$/$(@:b)$/DEBIAN$/{control postinst postrm prerm}
84 @chmod -R o-w $(MISC)$/$(@:b)
85 @chmod a+rx $(MISC)$/$(@:b)$/DEBIAN $(MISC)/$(@:b)/DEBIAN/post* $(MISC)/$(@:b)/DEBIAN/pre*
86 @chmod g-s $(MISC)/$(@:b)/DEBIAN
87 @mkdir -p $(PKGDIR)
88 /bin/bash -c "LD_PRELOAD=$(SOLARBINDIR)/getuid.so dpkg-deb --build $(MISC)/$(@:b) $@"
89 $(RM) -r $(MISC)$/$(@:b)
90# @chmod -R g+w $(MISC)/$(TARGET)/$(DEBFILE:f)
91
92.ENDIF
75
76# --- packaging ---------------------------------------------------
77
78# getuid.so fakes the user/group for us
79$(DEBFILES) : $(COMMONMISC)$/{$(PRODUCTLIST)}$/build.flag
80$(DEBFILES) : makefile.mk control postinst postrm prerm
81 -$(RM) $(@:d)$(@:f:s/_/ /:1)_*
82 $(RM) -r $(MISC)$/$(@:b)
83 dmake $(MISC)$/$(@:b)$/DEBIAN$/{control postinst postrm prerm}
84 @chmod -R o-w $(MISC)$/$(@:b)
85 @chmod a+rx $(MISC)$/$(@:b)$/DEBIAN $(MISC)/$(@:b)/DEBIAN/post* $(MISC)/$(@:b)/DEBIAN/pre*
86 @chmod g-s $(MISC)/$(@:b)/DEBIAN
87 @mkdir -p $(PKGDIR)
88 /bin/bash -c "LD_PRELOAD=$(SOLARBINDIR)/getuid.so dpkg-deb --build $(MISC)/$(@:b) $@"
89 $(RM) -r $(MISC)$/$(@:b)
90# @chmod -R g+w $(MISC)/$(TARGET)/$(DEBFILE:f)
91
92.ENDIF