Skip to content

Commit

Permalink
[#778] Rename Ubuntu Application & Package
Browse files Browse the repository at this point in the history
This renames the Ubuntu/Debian package and executable to
`pencil-prototyping` in order to avoid a conflict with the Pencil2D
application.

* Fix package contents permissions error in Ubuntu builds.
* Fix timestamped gzip file in Ubuntu builds.
* Fix Icon path in the .desktop file of non-Ubuntu Linux builds.

Closes #499
Closes #748
Closes #754
Closes #764
Closes #778
Closes #781
Closes #792
  • Loading branch information
prikhi committed Feb 9, 2016
1 parent 628110e commit 3cdcb42
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 21 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ This file describes all user-facing changes, by version.

# develop

* Change the Ubuntu build's package and application names to Pencil
Prototyping/pencil-prototyping(#781, #792, #764, #499).
* Change name to Pencil Prototyping for AMO(#749).
* Add Support for Firefox/XULrunner v43(#775).
* Fix Path to Icon in Linux(#764).
Expand Down
8 changes: 1 addition & 7 deletions build/Linux/pencil
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
#!/bin/bash

# Target for application ini
APP_INI="/usr/share/pencil/application.ini"

# If it does not exist, try legacy one
if [ ! -e "${APP_INI}" ]; then
APP_INI="/usr/share/evolus-pencil/application.ini"
fi

APP_INI="/usr/share/evolus-pencil/application.ini"

# List of firefox binaries to search
BINARIES="xulrunner iceweasel firefox firefox-bin"
Expand Down
2 changes: 1 addition & 1 deletion build/Linux/pencil.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Exec=/usr/bin/pencil %f
Terminal=false
Type=Application
StartupNotify=true
Icon=/usr/share/pencil/skin/classic/icon.svg
Icon=/usr/share/evolus-pencil/skin/classic/icon.svg
Categories=Graphics;2DGraphics;Development;
MimeType=application/ep;
2 changes: 1 addition & 1 deletion build/Ubuntu/control
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Package: pencil
Package: {PKG_NAME}
Version: {VERSION}
Section: devel
Priority: optional
Expand Down
2 changes: 1 addition & 1 deletion build/Ubuntu/copyright
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Files: *
Copyright: 2014-2015 {MAINTAINER}
Copyright: 2014-2016 {MAINTAINER}
License: /usr/share/common-licenses/GPL-2
28 changes: 17 additions & 11 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ mac() {


ubuntu() {
PKG="pencil-${VERSION}-ubuntu-all"
ALT_PKG_NAME='pencil-prototyping'
PKG="${ALT_PKG_NAME}-${VERSION}-ubuntu-all"
DIR_TARGET="./Outputs/Ubuntu"
DIR_BASE="${DIR_TARGET}/${PKG}"
DIR_DEB="${DIR_BASE}/DEBIAN"
Expand All @@ -270,10 +271,14 @@ ubuntu() {

rm -Rf ${DIR_TARGET}

run_task mkdir -p "${DIR_BASE}/usr/bin" "${DIR_SHARE}/applications" "${DIR_SHARE}/doc/pencil"
run_task cp ./Linux/pencil "${DIR_BASE}/usr/bin/pencil"
run_task cp ./Linux/pencil.desktop "${DIR_SHARE}/applications/pencil.desktop"
run_task cp -r ./Outputs/Pencil "${DIR_BASE}/usr/share/pencil"
run_task mkdir -p "${DIR_BASE}/usr/bin" "${DIR_SHARE}/applications" "${DIR_SHARE}/doc/${ALT_PKG_NAME}"
sed -e "s|${PKG_NAME}|${ALT_PKG_NAME}|" ./Linux/pencil > "${DIR_BASE}/usr/bin/${ALT_PKG_NAME}"
run_task chmod +x "${DIR_BASE}/usr/bin/${ALT_PKG_NAME}"
sed -e "s|${PKG_NAME}|${ALT_PKG_NAME}|" -e "s|/usr/bin/pencil|/usr/bin/${ALT_PKG_NAME}|" \
-e "s|Pencil|Pencil Prototyping|" \
./Linux/pencil.desktop > "${DIR_SHARE}/applications/${ALT_PKG_NAME}.desktop"
run_task cp -r ./Outputs/Pencil "${DIR_SHARE}/${ALT_PKG_NAME}"
sed -i "s|Pencil|Pencil Prototyping|" "${DIR_SHARE}/${ALT_PKG_NAME}/application.ini"
run_task mkdir -p "${DIR_DEB}"

old_ifs="${IFS}"
Expand All @@ -283,26 +288,27 @@ ubuntu() {

for line in $ctrl; do
line=$(echo $line | sed "s/{VERSION}/${VERSION}/g")
line=$(echo $line | sed "s/{PKG_NAME}/${ALT_PKG_NAME}/g")
line=$(echo $line | sed "s/{MAINTAINER}/${MAINTAINER}/g")
line=$(echo $line | sed "s/{MIN_VERSION}/${MIN_VERSION}/g")
echo $line >> ${DIR_DEB}/control
done

for line in $copy; do
line=$(echo $line | sed "s/{MAINTAINER}/${MAINTAINER}/g")
echo $line >> ${DIR_SHARE}/doc/pencil/copyright
echo $line >> ${DIR_SHARE}/doc/${ALT_PKG_NAME}/copyright
done

IFS="${old_ifs}"
run_task cp ../CHANGELOG.md ${DIR_SHARE}/doc/pencil/changelog
run_task gzip -9 ${DIR_SHARE}/doc/pencil/changelog
run_task cp ../CHANGELOG.md ${DIR_SHARE}/doc/${ALT_PKG_NAME}/changelog
run_task gzip -n -9 ${DIR_SHARE}/doc/${ALT_PKG_NAME}/changelog

# Remove extra license files to avoid Lintian warning
rm ${DIR_SHARE}/pencil/content/pencil/license.txt
rm ${DIR_SHARE}/pencil/license.txt
rm ${DIR_SHARE}/${ALT_PKG_NAME}/content/pencil/license.txt
rm ${DIR_SHARE}/${ALT_PKG_NAME}/license.txt

# Packages retain ownership, files should be owned by root
run_task sudo chown -R root ${DIR_BASE}
run_task sudo chown -R root:root ${DIR_BASE}

run_task dpkg-deb --build ${DIR_BASE}

Expand Down

0 comments on commit 3cdcb42

Please sign in to comment.