source: admin/Sources/Clients/ogagent/macos/Makefile @ 96b942a

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since 96b942a was 96b942a, checked in by ramon <ramongomez@…>, 8 years ago

#718: OGAgent para macOS: inicio automático y detección de datos de red.

git-svn-id: https://opengnsys.es/svn/branches/version1.1@5206 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100644
File size: 1.8 KB
Line 
1#!/usr/bin/make -f
2# -*- makefile -*-
3
4# Directories
5SOURCEDIR := ../src
6DESTDIR := /usr/local
7LIBDIR := $(DESTDIR)/share/OGAgent
8BINDIR := $(DESTDIR)/bin
9SBINDIR = $(DESTDIR)/sbin
10#APPSDIR := $(DESTDIR)/usr/share/applications
11CFGDIR := $(DESTDIR)/etc/ogagent
12INITDIR := /Library/LaunchDaemons
13#XDGAUTOSTARTDIR := $(DESTDIR)/etc/xdg/autostart
14#KDEAUTOSTARTDIR := $(DESTDIR)/usr/share/autostart
15
16PYC := $(shell find $(SOURCEDIR) -name '*.py[co]')
17CACHES := $(shell find $(SOURCEDIR) -name '__pycache__')
18
19clean:
20        rm -rf $(PYC) $(CACHES)
21
22install:
23        dependencies
24        install-ogagent
25
26dependencies:
27        easy_install pip        # Si no existe pip.
28        # comprobar versión de six, descargar e instalar con easy_install.
29        easy_install netifaces
30
31install-ogagent:
32        mkdir -p $(LIBDIR)
33        mkdir -p $(BINDIR)
34        mkdir -p $(SBINDIR)
35        mkdir -p $(CFGDIR)
36       
37        mkdir -p $(LIBDIR)/img
38       
39        # Cleans up .pyc and cache folders
40        rm -f $(PYC) $(CACHES)
41       
42        cp -r $(SOURCEDIR)/opengnsys $(LIBDIR)/opengnsys
43        cp -r $(SOURCEDIR)/cfg $(LIBDIR)/cfg
44        cp $(SOURCEDIR)/img/oga.png $(LIBDIR)/img
45
46        cp $(SOURCEDIR)/OGAgentUser.py $(LIBDIR)
47        # QT Dialogs & resources
48        #cp $(SOURCEDIR)/*_ui.py $(LIBDIR)
49        #cp $(SOURCEDIR)/OGAgent_rc.py $(LIBDIR)
50       
51        # Autostart elements for gnome/kde
52        #cp desktop/OGAgentTool.desktop $(XDGAUTOSTARTDIR)
53        #cp desktop/OGAgentTool.desktop $(KDEAUTOSTARTDIR)
54       
55        # scripts
56        cp scripts/ogagent $(BINDIR)
57        cp scripts/OGAgentTool-startup $(BINDIR)
58        cp scripts/OGAgentTool $(BINDIR)
59        cp scripts/es.opengnsys.ogagent.plist $(INITDIR)
60       
61        # Fix permissions
62        chmod 755 $(BINDIR)/ogagent
63        chmod 755 $(BINDIR)/OGAgentTool-startup
64        chmod 755 $(LIBDIR)/OGAgentUser.py
65        chmod 600 $(LIBDIR)/cfg/ogagent.cfg
66       
67        ln -fs $(LIBDIR)/cfg/ogagent.cfg $(CFGDIR)
68        ln -fs $(LIBDIR)/cfg/ogclient.cfg $(CFGDIR)
69       
70uninstall:
71        rm -rf $(LIBDIR)
72        rm -f $(BINDIR)/ogagent $(BINDIR)/OGAgent-Tool*
73        rm -rf $(CFGDIR)
Note: See TracBrowser for help on using the repository browser.