aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRinus Remspoor2016-10-20 22:29:05 +0200
committerRinus Remspoor2016-10-20 22:29:05 +0200
commitfdc04dedaf6eadde6618d9334f70c01f69609648 (patch)
tree12865914640e64ea57bc022b9729fbbe74c50a4b
parentd9a70a5889e7e9f4af6cf2ab4580384138e8ddb2 (diff)
downloadaur-fdc04dedaf6eadde6618d9334f70c01f69609648.tar.gz
Big rework, Thanks Jake!
- Reworked PKGBUILD, unused sections and extra variables removed - Removed icon files, used the one provided in the tarball - Use symbolic link to start next - Not generating .desktop anymore, added a file for that - Removed next.changelog, git has logging
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD89
-rw-r--r--next.changelog4
-rw-r--r--next.desktop14
4 files changed, 37 insertions, 75 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7190012da4cb..f907e98cff8f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,17 @@
pkgbase = next
pkgdesc = CGM rc Heli Flight Simulator
pkgver = 1.454
- pkgrel = 1
+ pkgrel = 2
url = http://www.rc-aerobatics.eu/index_e.html
- changelog = next.changelog
arch = i686
arch = x86_64
license = custom
optdepends = joyutils: jscal, jstest, and jsattach utilities for the Linux joystick driver
source = http://www.cgm-online.com/secure_rc-heli-simulator/cgm-rc-heli-simulator-linux-x86-64bit.zip
+ source = next.desktop
source = next.LICENSE
sha256sums = e26cb0d4fdcdbfbc275ceaef9e94ad151d34792a1879dddd896ed2953d184576
+ sha256sums = 51657bc7148aeb3ee0c8b75a354fd701f510ffcfc04b6f5810eb6f4abb2d34c8
sha256sums = febb1e65a7932f2f80155078b1dd64f469433625c76cff43b239768a184729f0
pkgname = next
diff --git a/PKGBUILD b/PKGBUILD
index 8426fca42dee..230d8a1b1cf7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=next
pkgver=1.454
-pkgrel=1
+pkgrel=2
pkgdesc="CGM rc Heli Flight Simulator"
arch=('i686' 'x86_64')
url="http://www.rc-aerobatics.eu/index_e.html"
@@ -11,26 +11,25 @@ groups=()
backup=()
options=()
install=
-changelog=${pkgname}.changelog
-#makedepends=( 'gendesk')
depends=()
optdepends=( 'joyutils: jscal, jstest, and jsattach utilities for the Linux joystick driver')
+
source=( 'http://www.cgm-online.com/secure_rc-heli-simulator/cgm-rc-heli-simulator-linux-x86-64bit.zip'
+ 'next.desktop'
'next.LICENSE')
sha256sums=( 'e26cb0d4fdcdbfbc275ceaef9e94ad151d34792a1879dddd896ed2953d184576'
+ '51657bc7148aeb3ee0c8b75a354fd701f510ffcfc04b6f5810eb6f4abb2d34c8'
'febb1e65a7932f2f80155078b1dd64f469433625c76cff43b239768a184729f0')
-_DEST_PREFIX="/opt/${pkgname}"
-
prepare() {
# rename the original directory to something sane and remove an OSX directory
mv "Linux x86+64bit" "${pkgname}"
rm -r "__MACOSX"
- cd "${pkgname}"
+ cd "${srcdir}/${pkgname}"
- # Remove unneeded and platform dependent files
+ # Remove unneeded architecture/platform dependent files
msg2 "Removing unneeded files..."
find . -name '.DS_Store' -exec rm {} \;
@@ -44,76 +43,28 @@ prepare() {
rm -r ./neXt_Data/Plugins/x86
rm ./neXt.x86
fi
-
- msg2 "Creating .desktop file..."
- #gendesk --pkgname "${pkgname}-test" --pkgdesc "${pkgdesc}" -n
-
- if [ "${CARCH}" == 'i686' ]; then
- cat > "${srcdir}"/${pkgname}.desktop << EOF
-[Desktop Entry]
-Encoding=UTF-8
-Name=neXt
-Version=1.0
-GenericName=A helicopter flight simulator made by CGM
-Comment=${pkgdesc}
-Exec=/opt/${pkgname}/neXt.x86
-Terminal=false
-Icon=/usr/share/icons/hicolor/96x96/apps/next.png
-#Icon=${pkgname}
-Type=Application
-StartupNotify=false
-Categories=Education;
-Keywords=simulator;rc;helicopter
-EOF
- fi
- if [ "${CARCH}" == "x86_64" ]; then
- cat > "${srcdir}"/${pkgname}.desktop << EOF
-[Desktop Entry]
-Encoding=UTF-8
-Name=neXt
-Version=1.0
-GenericName=A helicopter flight simulator made by CGM
-Comment=${pkgdesc}
-Exec=/opt/${pkgname}/neXt.x86_64
-Terminal=false
-Icon=/usr/share/icons/hicolor/96x96/apps/next.png
-#Icon=${pkgname}
-Type=Application
-StartupNotify=false
-Categories=Education;
-Keywords=simulator;rc;helicopter
-EOF
- fi
}
-#build() {
-#
-#}
-
package() {
- cd "${srcdir}/${pkgname}"
-
# Install files to ${pkgdir}
- install -dm755 "${pkgdir}${_DEST_PREFIX}"
+ install -dm755 "${pkgdir}/opt/${pkgname}"
msg2 "Copying files to package directory..."
- cp -dr --no-preserve=ownership . ${pkgdir}/${_DEST_PREFIX}
+ cp -dr --no-preserve=ownership "${srcdir}/${pkgname}" "${pkgdir}/opt/"
- msg2 "Copying icon files to package directory..."
- cd ${srcdir}
- # Find all files with extension .png, extract the icon size and install into the right directory
- for i in *.png; do
- # Bad hack, could this be done in one line?
- ii="${i##*-}"
- iconsize="${ii%.*}"
- iconext="${i##*.}"
- iconname="${i%%-*}"
- install -Dm644 ${i} "${pkgdir}/usr/share/icons/hicolor/${iconsize}/apps/${iconname}.${iconext}"
- done
+ msg2 "Installing icon file..."
+ install -Dm644 "${srcdir}/${pkgname}/neXt_Data/Resources/UnityPlayer.png" "${pkgdir}/usr/share/icons/hicolor/128x128/apps/${pkgname}.png"
- msg2 "Installing .desktop file..."
- install -Dm644 "${srcdir}"/${pkgname}.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+ msg2 "Installing ${pkgname}.desktop file..."
+ install -Dm644 "${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
- # Install license file, can't find one right now, maybe ask the author of the software later.
+ msg2 "Installing LICENSE file..."
+ # Can't find the proper license right now, maybe contact the author of the software later.
install -Dm644 ${pkgname}.LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ msg2 "Creating symlink..."
+ cd "${pkgdir}/opt/${pkgname}"
+ if [ -f "./neXt.x86_64" ]; then ln -s "neXt.x86_64" "${pkgname}"; fi
+ if [ -f "./neXt.x86" ]; then ln -s "neXt.x86" "${pkgname}"; fi
+
}
diff --git a/next.changelog b/next.changelog
deleted file mode 100644
index d8bb653a219e..000000000000
--- a/next.changelog
+++ /dev/null
@@ -1,4 +0,0 @@
-20161017: remspoor AT linuxmail DOT org
- Update for version 1.454
-20161015: remspoor AT linuxmail DOT org
- Initial package created
diff --git a/next.desktop b/next.desktop
new file mode 100644
index 000000000000..d3dfb3a3d270
--- /dev/null
+++ b/next.desktop
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=neXt
+Version=1.0
+GenericName=A helicopter flight simulator made by CGM
+Comment=r/c Heli Flight Simulator made by Klaus Eiperle, Eiperle CGM
+Exec=/opt/next/next
+Terminal=false
+Icon=next.png
+Type=Application
+StartupNotify=false
+Categories=Education;
+Keywords=simulator;rc;helicopter
+