From 9744fadaf89eed2fca0df79c1e7cc73631004b41 Mon Sep 17 00:00:00 2001 From: losuler Date: Thu, 11 Mar 2021 20:29:15 +1100 Subject: [PATCH] Initial commit --- .gitignore | 3 ++ LICENSE.txt | 21 ++++++++++++ Makefile | 8 +++++ README.md | 51 ++++++++++++++++++++++++++++++ com.cisco.PacketTracer.appdata.xml | 23 ++++++++++++++ com.cisco.PacketTracer.desktop | 12 +++++++ com.cisco.PacketTracer.yml | 38 ++++++++++++++++++++++ 7 files changed, 156 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE.txt create mode 100644 Makefile create mode 100644 README.md create mode 100644 com.cisco.PacketTracer.appdata.xml create mode 100644 com.cisco.PacketTracer.desktop create mode 100644 com.cisco.PacketTracer.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..91bbe6a --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.deb +build/ +.flatpak-builder/ diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..be0e619 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Bryce Torcello + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..baeb799 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +install: + flatpak-builder --delete-build-dirs --force-clean --user --install build com.cisco.PacketTracer.yml + +uninstall: + flatpak uninstall --delete-data com.cisco.PacketTracer.yml + +clean: + rm --recursive --force build .flatpak-builder diff --git a/README.md b/README.md new file mode 100644 index 0000000..9215a3a --- /dev/null +++ b/README.md @@ -0,0 +1,51 @@ +
+

+

+

Packet Tracer Flatpak

+

+ A Flatpak manifest for Cisco's Packet Tracer. +

+

+

+
+ +## About + +This is a Flatpak manifest for [Cisco's Packet Tracer](https://www.netacad.com/courses/packet-tracer). The Deb package in which Cisco distributes their binary build of Packet Tracer is not included as the download link for and use of Packet Tracer itself requires a Netacad account. + +This is currently based on Packet Tracer 8.0 and is intended to track the latest release. For previous releases see [janymal/PacketTracer7-flatpak](https://github.com/janymal/PacketTracer7-flatpak) and [rpallai/flatpak-pt](https://github.com/rpallai/flatpak-pt). + +## Building + +1. Clone this repository. + + ```bash + git clone https://github.com/losuler/com.cisco.PacketTracer + ``` + +2. Install build depenendcies. + + ``` + flatpak-builder + ``` + +3. Install Flatpak runtime dependencies. + + ``` + org.freedesktop.Platform/x86_64/20.08 + org.freedesktop.Sdk/x86_64/20.08 + ``` + +4. Download the official Deb package. + + https://www.netacad.com/portal/resources/packet-tracer + +5. Build and install the Flatpak. + + ```bash + make install + ``` + +## Notes + +- Do not remove the `.flatpak-builder` directory that is created during the build (while the Flatpak is installed) as it serves as the local Flatpak repository. diff --git a/com.cisco.PacketTracer.appdata.xml b/com.cisco.PacketTracer.appdata.xml new file mode 100644 index 0000000..c9c7885 --- /dev/null +++ b/com.cisco.PacketTracer.appdata.xml @@ -0,0 +1,23 @@ + + + com.cisco.PacketTracer + + Packet Tracer + Powerful network simulation tool built by Cisco + + MIT + + LicenseRef-proprietary=https://www.cisco.com/c/dam/en_us/about/doing_business/legal/seula/cisco-packet-tracer-software.pdf + + + +

+ Get real world experience with this powerful network simulation tool built by Cisco. Practice building simple and complex networks across a variety of devices and extend beyond routers and switches. Create solutions that are interconnected for smart cities, homes, and enterprises. +

+

+ Use it alongside instructional courses, professional training, work planning or just to have some fun. +

+
+ + com.cisco.PacketTracer.desktop +
diff --git a/com.cisco.PacketTracer.desktop b/com.cisco.PacketTracer.desktop new file mode 100644 index 0000000..24b8e35 --- /dev/null +++ b/com.cisco.PacketTracer.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Application + +Exec=/app/pt/packettracer %F +Icon=com.cisco.PacketTracer + +Name=Packet Tracer +Categories=Application;Network; + +MimeType=application/x-pkt;application/x-pka;application/x-pkz; +StartupWMClass=PacketTracer diff --git a/com.cisco.PacketTracer.yml b/com.cisco.PacketTracer.yml new file mode 100644 index 0000000..62c1801 --- /dev/null +++ b/com.cisco.PacketTracer.yml @@ -0,0 +1,38 @@ +app-id: com.cisco.PacketTracer +runtime: org.freedesktop.Platform +runtime-version: '20.08' +sdk: org.freedesktop.Sdk +command: /app/pt/packettracer +finish-args: + - --share=ipc + - --share=network + - --socket=x11 + - --socket=pulseaudio + - --device=dri + - --filesystem=xdg-download + - --persist=. + +modules: + - name: packettracer + buildsystem: simple + build-commands: + - install -D com.cisco.PacketTracer.appdata.xml /app/share/metainfo/com.cisco.PacketTracer.appdata.xml + - ar x PacketTracer_800_amd64_build212_final.deb + - xz -d data.tar.xz + - tar -xf data.tar + - find opt/pt/saves -type d -exec chmod 755 {} + + - find opt/pt/saves -type f -exec chmod 644 {} + + - mv opt/pt /app + - install -D /app/pt/art/app.png /app/share/icons/hicolor/48x48/apps/com.cisco.PacketTracer.png + - install -D com.cisco.PacketTracer.desktop /app/share/applications/com.cisco.PacketTracer.desktop + - sed -i -e 's\/opt/\/app/\g' /app/pt/packettracer /app/pt/linguist + - sed -i -e 's\"$@"\-style windows "$@"\;' /app/pt/packettracer /app/pt/linguist + + sources: + - type: file + path: PacketTracer_800_amd64_build212_final.deb + sha256: c9a78f9d1ee63fa421d3c531e9e1c209e425ba84d78c8e606594e4e59df535c9 + - type: file + path: com.cisco.PacketTracer.appdata.xml + - type: file + path: com.cisco.PacketTracer.desktop