You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by ma...@apache.org on 2018/04/29 12:53:56 UTC

[incubator-netbeans] branch master updated: [NETBEANS-341] Added initial files required for Snap packaging (#404)

This is an automated email from the ASF dual-hosted git repository.

matthiasblaesing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 46696a1  [NETBEANS-341] Added initial files required for Snap packaging (#404)
46696a1 is described below

commit 46696a1598231bc06b78534eccd477855d1fabd0
Author: Laszlo Kishalmi <la...@gmail.com>
AuthorDate: Sun Apr 29 05:53:53 2018 -0700

    [NETBEANS-341] Added initial files required for Snap packaging (#404)
    
    * [NETBEANS-341] Added initial files required for Snap packaging
    
    * Moved snap packaging files under nbbuild/packaging/snap
    
    * Commented the default cache and data dir changes in the startup script.
    
    * Made snap build to use strictly OpenJDK 8.
    
    * Restrict Snap to amd64 architecture only
---
 .gitignore                                  |  9 +++++
 nbbuild/packaging/snap/gui/netbeans.desktop | 25 +++++++++++++
 nbbuild/packaging/snap/snapcraft.yaml       | 57 +++++++++++++++++++++++++++++
 3 files changed, 91 insertions(+)

diff --git a/.gitignore b/.gitignore
index bcd6d42..345a4de 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,3 +41,12 @@
 /xml/test/qa-functional/data/ActionsTestProject/nbproject/private/
 /xml/test/qa-functional/data/CoreTemplatesTestProject/nbproject/private/
 /javafx2.samples/FXML-LoginDemo/nbproject/private/
+
+# Snapcraft Generated files #
+#######################
+/nbbuild/packaging/snap/.snapcraft/
+/nbbuild/packaging/parts/
+/nbbuild/packaging/prime/
+/nbbuild/packaging/stage/
+*.snap
+
diff --git a/nbbuild/packaging/snap/gui/netbeans.desktop b/nbbuild/packaging/snap/gui/netbeans.desktop
new file mode 100644
index 0000000..a872037
--- /dev/null
+++ b/nbbuild/packaging/snap/gui/netbeans.desktop
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=NetBeans Dev
+Comment=The Smarter Way to Code
+Exec=netbeans %F
+Categories=Application;Development;Java;IDE
+Icon=${SNAP}/meta/gui/icon.png
+Terminal=false
diff --git a/nbbuild/packaging/snap/snapcraft.yaml b/nbbuild/packaging/snap/snapcraft.yaml
new file mode 100644
index 0000000..bb9be08
--- /dev/null
+++ b/nbbuild/packaging/snap/snapcraft.yaml
@@ -0,0 +1,57 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: netbeans
+version: "9.0-dev"
+summary: NetBeans Java IDE
+description: |
+  NetBeans IDE lets you quickly and easily develop Java desktop, mobile, and 
+  web applications, as well as HTML5 applications with HTML, JavaScript, and
+  CSS. The IDE also provides a great set of tools for PHP and C/C++ developers.
+  It is free and open source and has a large community of users and developers
+  around the world. 
+icon: ../../ide.branding/release/netbeans.png
+confinement: classic
+grade: devel
+architectures: [ amd64 ]
+
+parts:
+  build:
+    build-packages:
+        - openjdk-8-jdk-headless
+        - ant
+    build: |
+        JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
+        export JAVA_HOME
+        ant -quiet -Djavac.compilerargs=-nowarn -Dbuild.compiler.deprecation=false
+    build-attributes: [ no-patchelf ]
+    plugin: nil
+    source: ../../
+    filesets:
+        netbeans: [ netbeans/*, -netbeans/*.built ]
+    install: |
+        mv nbbuild/netbeans $SNAPCRAFT_PART_INSTALL/netbeans
+        # Make the default cache and data directory relative to Snap user directory
+        sed -i 's/${HOME}\/.netbeans/${SNAP_USER_COMMON}\/data/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans
+        sed -i 's/${HOME}\/.cache\/netbeans/${SNAP_USER_COMMON}\/cache/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans
+    stage:
+        - $netbeans
+
+apps:
+  netbeans:
+    command: netbeans/bin/netbeans
+
+

-- 
To stop receiving notification emails like this one, please contact
matthiasblaesing@apache.org.

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists