Impress Remote 1.0.5, tag sdremote-1.0.5
[LibreOffice.git] / sysui / desktop / debian / makefile.mk
blobd61436eb3ad190ea26b68c8dc1b303e9032186a6
2 # This file is part of the LibreOffice project.
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 # This file incorporates work covered by the following license notice:
10 # Licensed to the Apache Software Foundation (ASF) under one or more
11 # contributor license agreements. See the NOTICE file distributed
12 # with this work for additional information regarding copyright
13 # ownership. The ASF licenses this file to you under the Apache
14 # License, Version 2.0 (the "License"); you may not use this file
15 # except in compliance with the License. You may obtain a copy of
16 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 PRJ=..$/..
21 PRJNAME=sysui
22 TARGET=debian
24 # !!! FIXME !!!
25 # debian-menus file.
27 # --- Settings -----------------------------------------------------
29 .INCLUDE : settings.mk
31 # --- Product Version Information ----------------------------------
33 .INCLUDE : ../productversion.mk
35 # --- Files --------------------------------------------------------
37 .IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/deb//)"
39 DEBFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i$(PRODUCTVERSION)-$(TARGET)-menus_$(PKGVERSION.$i)-$(PKGREV)_all.deb)
41 .ENDIF
43 # --- Targets -------------------------------------------------------
45 .INCLUDE : target.mk
47 .IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/deb//)"
49 ALLTAR : $(DEBFILES)
52 %/DEBIAN/control : $$(@:f)
53 @$(MKDIRHIER) $(@:d) $*$/etc $*$/usr/share/applnk/Office $*$/usr/lib/menu
54 ln -sf /opt/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//)) $*$/etc$/
55 /bin/sh -c -x "cd $(COMMONMISC)$/$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//) && DESTDIR=$(shell @cd $*; pwd) ICON_PREFIX=$(ICONPREFIX) KDEMAINDIR=/usr GNOMEDIR=/usr create_tree.sh"
56 @cat openoffice.org-debian-menus | sed -e 's/%PRODUCTNAME/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//)) $(PRODUCTVERSION.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//))/' -e 's/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//))/' -e 's/%ICONPREFIX/$(ICONPREFIX.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//))/' > $*$/usr/lib/menu/$(*:f:s/_/ /:1:s/$(PRODUCTVERSION)//)
57 echo "Package: $(*:f:s/_/ /:1:s/$(PRODUCTVERSION)//)" > $@
58 cat $(@:f) | tr -d "\015" | sed "s/%productname/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//))/" >> $@
59 echo "Version: $(PKGVERSION.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//))-$(PKGREV)" >> $@
60 @du -k -s $* | awk -F ' ' '{ printf "Installed-Size: %s\n", $$1 ; }' >> $@
62 %/DEBIAN/postinst : $$(@:f)
63 @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//))/g" > $@
65 %/DEBIAN/postrm : $$(@:f)
66 @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//))/g" > $@
68 %/DEBIAN/prerm : $$(@:f)
69 @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//))/g" > $@
71 # --- packaging ---------------------------------------------------
73 # getuid.so fakes the user/group for us
74 $(DEBFILES) : $(COMMONMISC)$/{$(PRODUCTLIST)}$/build.flag
75 $(DEBFILES) : makefile.mk control postinst postrm prerm
76 -$(RM) $(@:d)$(@:f:s/_/ /:1)_*
77 $(RM) -r $(MISC)$/$(@:b)
78 dmake $(MISC)$/$(@:b)$/DEBIAN$/{control postinst postrm prerm}
79 @chmod -R g-w $(MISC)$/$(@:b)
80 @chmod a+rx $(MISC)$/$(@:b)$/DEBIAN $(MISC)/$(@:b)/DEBIAN/post* $(MISC)/$(@:b)/DEBIAN/pre*
81 @chmod g-s $(MISC)/$(@:b)/DEBIAN
82 @mkdir -p $(PKGDIR)
83 /bin/bash -c "LD_PRELOAD=$(SOLARBINDIR)/getuid.so dpkg-deb --build $(MISC)/$(@:b) $@"
84 $(RM) -r $(MISC)$/$(@:b)
85 # @chmod -R g+w $(MISC)/$(TARGET)/$(DEBFILE:f)
87 .ENDIF