Impress Remote 1.0.5, tag sdremote-1.0.5
[LibreOffice.git] / sysui / desktop / slackware / makefile.mk
blob334405f5e7e315244f628f2ccd777048068e7a0d
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=slackware
24 # --- Settings -----------------------------------------------------
26 .INCLUDE : settings.mk
28 # --- Product Version Information ----------------------------------
30 .INCLUDE : ../productversion.mk
32 # --- Files --------------------------------------------------------
34 MENUFILES=$(PKGDIR)$/{$(PRODUCTLIST)}$(PRODUCTVERSION)-$(TARGET)-menus-$(PKGVERSION)-noarch-$(PKGREV).tgz
36 # --- Targets -------------------------------------------------------
38 .INCLUDE : target.mk
40 .IF "$(OS)" == "LINUX"
42 ALLTAR : $(MENUFILES)
44 $(MISC)/$(TARGET)/usr/share/applications/ :
45 @$(MKDIRHIER) $(@)
47 # --- slackware-specific stuff ------------------------------------
48 # symlinks shall not be included in the tarball, but created with the doinst-script
50 # FIXME: removal of *-extension.* only to create identical packages to OOF680
51 %/usr/share/applications :
52 @$(MKDIRHIER) $@
53 /bin/sh -c "cd $(COMMONMISC)$/$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//); DESTDIR=$(shell @cd $*; pwd) GNOMEDIR="" ICON_PREFIX=$(ICONPREFIX.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//)) KDEMAINDIR=/opt/kde .$/create_tree.sh"
54 $(RM) $*$/opt$/kde$/share$/icons$/*$/*$/*$/*-extension.png
55 $(RM) $*$/opt$/kde$/share$/mimelnk$/application$/*-extension.desktop
56 $(RM) $*$/usr$/share$/applications$/*.desktop
57 $(RM) $*$/usr$/bin$/soffice
59 %$/install$/doinst.sh : update-script
60 @echo "( cd etc ; rm -rf $(UNIXFILENAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//)) )" > $@
61 @echo "( cd etc ; ln -snf /opt/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//):s/-//) $(UNIXFILENAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//)) )" >> $@
62 @echo "( cd usr/bin ; rm -rf soffice )" >> $@
63 @echo "( cd usr/bin ; ln -sf /etc/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//))/program/soffice soffice )" >> $@
64 @echo -e $(foreach,i,$(shell @cat $(COMMONMISC)$/$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//)/launcherlist) "\n( cd usr/share/applications ; rm -rf $(UNIXFILENAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//))-$i )\n( cd usr/share/applications ; ln -sf /etc/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//))/share/xdg/$i $(UNIXFILENAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//))-$i )") >> $@
65 @cat $< >> $@
67 %$/install$/slack-desc : slack-desc
68 @$(MKDIRHIER) $(@:d)
69 @sed -e "s/PKGNAME/$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//)-$(TARGET)-menus/g" -e "s/PKGVERSION/$(PKGVERSION.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//))/g" \
70 -e "s/LONGPRODUCTNAME/$(PRODUCTNAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//)) $(PRODUCTVERSION.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//))/g" \
71 -e "s/PRODUCTNAME/$(PRODUCTNAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//))/g" \
72 -e "s/UNIXFILENAME/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//))/g" $< > $@
74 # needed to satisfy the slackware package tools - they need
75 # the entries like this
76 # ./ <- very important
77 # directory/file
78 # the follwoing does not work (no description found then):
79 # ./
80 # ./directory/file
81 # and this doesn't work either (broken file-list, package cannot be removed)
82 # directory/file
84 $(MISC)/$(TARGET)/empty.tar :
85 @$(MKDIRHIER) $(@:d)/empty
86 @$(GNUTAR) -C $(MISC)/$(TARGET)/empty --owner=root --group=root --same-owner -cf $@ .
89 # --- packaging ---------------------------------------------------
91 $(MENUFILES) : makefile.mk slack-desc update-script $(COMMONMISC)$/{$(PRODUCTLIST)}$/build.flag
92 $(MENUFILES) : $(MISC)/$(TARGET)/empty.tar
93 @-$(MKDIRHIER) $(@:d)
94 -$(RM) $(@:d)$/$(@:b:s/-/ /:1)-$(TARGET)-menus-*.tgz
95 -$(RM) -r $(MISC)$/$(@:b)
96 dmake $(MISC)$/$(@:b)$/usr/share/applications $(MISC)$/$(@:b)$/install$/slack-desc $(MISC)$/$(@:b)$/install$/doinst.sh
97 @$(COPY) $(MISC)/$(TARGET)$/empty.tar $@.tmp
98 @$(GNUTAR) -C $(MISC)/$(@:b) --owner=root --group=root --same-owner --exclude application.flag -rf $@.tmp install usr opt
99 @gzip < $@.tmp > $@
100 @$(RM) $@.tmp
101 $(RM) -r $(MISC)$/$(@:b)
103 .ENDIF