Browse Source

Packaging Debian fonctionnel

feature/remote-launch
William Petit 3 years ago
parent
commit
331db1e035
7 changed files with 31 additions and 24 deletions
  1. 17
    6
      Makefile
  2. 2
    8
      debian/control
  3. 0
    1
      debian/pitaya_amd64.install
  4. 0
    1
      debian/pitaya_ia32.install
  5. 10
    1
      debian/rules
  6. 2
    2
      package.json
  7. 0
    5
      scripts/install-build-deps.sh

+ 17
- 6
Makefile View File

@@ -1,11 +1,22 @@
1
+DESTDIR=./
2
+INSTALL_LOCATION=$(DESTDIR)/opt/pitaya
3
+ELECTRON_ARCH=x64
1 4
 
5
+ifeq ($(DEB_TARGET_ARCH), i386)
6
+	ELECTRON_ARCH=ia32
7
+endif
2 8
 
3
-build: clean
4
-	npm run build
9
+all: build
5 10
 
6
-clean: install-deps
11
+build:
12
+	apt-get install --yes --no-install-recommends curl ca-certificates
13
+	curl --silent --location https://deb.nodesource.com/setup_0.12 | bash -
14
+	apt-get install --yes nodejs
15
+	npm install --ignore-scripts
7 16
 	npm run clean
17
+	npm run compile
18
+	npm run package -- --arch=$(ELECTRON_ARCH)
8 19
 
9
-install-deps:
10
-	./scripts/install-build-deps.sh
11
-	npm install
20
+install:
21
+	mkdir -p $(INSTALL_LOCATION)
22
+	cp -r build/pitaya-linux-$(ELECTRON_ARCH)/* $(INSTALL_LOCATION)/

+ 2
- 8
debian/control View File

@@ -8,12 +8,6 @@ Homepage:
8 8
 Vcs-Git: https://forge.cadoles.com/wpetit/pitaya.git
9 9
 Vcs-Browser: https://forge.cadoles.com/wpetit/pitaya
10 10
 
11
-Package: pitaya_amd64
12
-Architecture: amd64
13
-Depends: ${shlibs:Depends}, ${misc:Depends}
14
-Description: Lanceur d'application pour GNU/Linux
15
-
16
-Package: pitaya_ia32
17
-Architecture: ia32
18
-Depends: ${shlibs:Depends}, ${misc:Depends}
11
+Package: pitaya
12
+Architecture: any
19 13
 Description: Lanceur d'application pour GNU/Linux

+ 0
- 1
debian/pitaya_amd64.install View File

@@ -1 +0,0 @@
1
-build/pitaya-linux-x64/* opt/pitaya

+ 0
- 1
debian/pitaya_ia32.install View File

@@ -1 +0,0 @@
1
-build/pitaya-linux-ia32/* opt/pitaya

+ 10
- 1
debian/rules View File

@@ -2,7 +2,16 @@
2 2
 # -*- makefile -*-
3 3
 
4 4
 # Uncomment this to turn on verbose mode.
5
-#export DH_VERBOSE=1
5
+export DH_VERBOSE=1
6 6
 
7 7
 %:
8 8
 	dh $@
9
+
10
+override_dh_makeshlibs:
11
+	# Disabled
12
+
13
+override_dh_shlibdeps:
14
+	# Disabled
15
+
16
+override_dh_strip:
17
+	# Disabled

+ 2
- 2
package.json View File

@@ -13,9 +13,9 @@
13 13
   "scripts": {
14 14
     "test": "./node_modules/.bin/nodeunit test",
15 15
     "start": "./node_modules/.bin/electron .",
16
-    "compile": "./node_modules/.bin/jsx -x js src dist",
16
+    "compile": "./node_modules/.bin/jsx -x js --no-cache-dir src dist",
17 17
     "clean": "rm -rf dist/* build/*",
18
-    "package": "./node_modules/.bin/electron-packager ./ pitaya --prune --ignore=res/ --ignore=scripts/ --ignore=debian/ --ignore=test/ --platform=linux --arch=ia32,x64 --version=0.33.6 --out=build --overwrite --app-version 0.0.0",
18
+    "package": "./node_modules/.bin/electron-packager ./ pitaya --out=./build --app-version 0.0.0 --version=0.33.6 --prune --ignore='/res(/|$)' --ignore='/debian(/|$)' --ignore='/scripts(/|$)' --ignore='/build(/|$)' --ignore='/test(/|$)' --ignore='/electron-packager(/|$)' --ignore='/electron-tmp-.+(/|$)' --platform=linux --overwrite",
19 19
     "build": "npm run clean && npm run compile && npm run package"
20 20
   },
21 21
   "dependencies": {

+ 0
- 5
scripts/install-build-deps.sh View File

@@ -1,5 +0,0 @@
1
-#!/usr/bin/env bash
2
-
3
-apt-get install --yes --no-install-recommends curl ca-certificates || exit 1
4
-curl --silent --location https://deb.nodesource.com/setup_4.x | bash - || exit 1
5
-apt-get install --yes nodejs || exit 1

Loading…
Cancel
Save