-
Notifications
You must be signed in to change notification settings - Fork 616
Linux universal installer #316
Changes from all commits
282efa6
847d231
b970c41
976723e
aa53948
c6944e3
4110ee9
b79b6c4
ed90537
11303d7
12c8551
b9b424a
c4e42e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# Maintainer: Brackets Team <[email protected]> | ||
pkgname=brackets | ||
pkgver= | ||
pkgrel=1 | ||
pkgdesc="A code editor for HTML, CSS and JavaScript. " | ||
arch=("i686" "x86_64") | ||
url="http://brackets.io" | ||
license=("MIT") | ||
depends=("brackets-lib" "gconf" "nodejs" "nspr" "systemd") | ||
makedepends=("prelink") | ||
optdepends=( | ||
"alsa-lib: <future use>" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why asla-lib? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Namcap says that some library from brackets (libcef.so if I remember) needs (optional) alsa support. Look at current debian package dependencies (libasound2). |
||
"chromium: to enable Live Preview" | ||
"gnuplot: to enable node benchmarking" | ||
"gtk2: to enable native UI" | ||
"ruby: to enable LiveDevelopment Inspector" | ||
"desktop-file-utils: for update-desktop-database" | ||
"hicolor-icon-theme: for hicolor theme hierarchy" | ||
) | ||
provides=("brackets" "adobe-brackets") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is adobe-brackets? I don't see that used anywhere. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I saw this in brackets-git. It's probably unnecessary. |
||
conflicts=("brackets-git") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is brackets-git? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This package from aur fix mess with some libraries names. Symlinks should have own packages, because of possibility of breaking system after uninstalling package with symlinks. |
||
replaces=() | ||
backup=() | ||
options=() | ||
install=${pkgname}.install | ||
|
||
source=() | ||
|
||
|
||
prepare() { | ||
cd "$srcdir" | ||
|
||
echo " -> Fixing executable stack..." | ||
execstack -c "Brackets" | ||
} | ||
|
||
package() { | ||
cd ${srcdir} | ||
|
||
echo " -> Installing program..." | ||
install -dm755 "${pkgdir}/usr/bin" | ||
install -Dm755 \ | ||
"Brackets" \ | ||
"${pkgdir}/opt/${pkgname}/Brackets" | ||
|
||
install -Dm755 \ | ||
"brackets" \ | ||
"${pkgdir}/opt/${pkgname}/brackets" | ||
|
||
ln -s "/opt/${pkgname}/brackets" "${pkgdir}/usr/bin/brackets" | ||
|
||
for _file in *.pak; do | ||
install -Dm644 \ | ||
"${_file}" \ | ||
"${pkgdir}/opt/${pkgname}/${_file}" | ||
done | ||
|
||
for _file in "lib/"*; do | ||
local _filename="${_file##*/}" | ||
install -Dm755 \ | ||
"${_file}" \ | ||
"${pkgdir}/usr/lib/${_filename}" | ||
done | ||
|
||
for _file in "locales/"*; do | ||
install -Dm644 \ | ||
"${_file}" \ | ||
"${pkgdir}/opt/${pkgname}/${_file}" | ||
done | ||
|
||
cp -dpr --no-preserve=ownership \ | ||
"www" \ | ||
"${pkgdir}/opt/${pkgname}/www" | ||
|
||
cp -dpr --no-preserve=ownership \ | ||
"samples" \ | ||
"${pkgdir}/opt/${pkgname}/samples" | ||
|
||
|
||
echo " -> Installing icons..." | ||
local _icon_dir="usr/share/icons/hicolor" | ||
install -Dm644 \ | ||
"${pkgname}.svg" \ | ||
"${pkgdir}/${_icon_dir}/scalable/apps/${pkgname}.svg" | ||
for _icon in "appshell"*.png; do | ||
local _icon_size="${_icon##*appshell}" | ||
install -Dm644 \ | ||
"${_icon}" \ | ||
"${pkgdir}/${_icon_dir}/${_icon_size%.png}x${_icon_size%.png}/apps/${pkgname}.png" | ||
done | ||
|
||
|
||
echo " -> Installing .desktop file..." | ||
install -Dm755 \ | ||
"${pkgname}.desktop" \ | ||
"${pkgdir}/usr/share/applications/${pkgname}.desktop" | ||
|
||
|
||
echo " -> Installing license..." | ||
install -Dm644 \ | ||
"license" \ | ||
"${pkgdir}/usr/share/licenses/${pkgname}/license" | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
post_install() { | ||
xdg-icon-resource forceupdate --theme hicolor &> /dev/null | ||
update-desktop-database -q | ||
update-mime-database usr/share/mime | ||
echo "==> Linux version doesn't always run as expected. See: https://github.com/adobe/brackets/wiki/Linux-Version#known-issues" | ||
echo "==> To use Live Preview with chromium do: # ln -s /usr/bin/chromium /usr/bin/google-chrome" | ||
} | ||
|
||
post_upgrade() { | ||
post_install | ||
} | ||
|
||
post_remove() { | ||
xdg-icon-resource forceupdate --theme hicolor &> /dev/null | ||
update-desktop-database -q | ||
update-mime-database usr/share/mime | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
# | ||
# Package builder for Arch Linux | ||
# | ||
|
||
# | ||
# GLOBAL VARIABLES | ||
# | ||
|
||
# brackets version number | ||
VERSION=`. linux/INFO; echo ${MINOR_VERSION}` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use the full version, e.g. 0.30.0-9116 from |
||
|
||
|
||
# | ||
# FUNCTIONS | ||
# | ||
|
||
# create build filesystem | ||
prepare() { | ||
cp -dpr --no-preserve=ownership \ | ||
"../staging/" \ | ||
"src" | ||
cp -dpr --no-preserve=ownership \ | ||
"../linux/." \ | ||
"src" | ||
|
||
# update pkgbuild file | ||
pkgbuild | ||
|
||
# delete old package | ||
rm -f *pkg.tar* | ||
} | ||
|
||
# postbuild clean | ||
clean() { | ||
mv *pkg.tar* ../ | ||
rm -rf src | ||
rm -rf pkg | ||
rm -f PKGBUILD | ||
} | ||
|
||
# update pkgbuild file | ||
pkgbuild() { | ||
awk -v ver=${VERSION} \ | ||
'BEGIN{FS="=";OFS="="} {\ | ||
sub(/^pkgver=.*/, $1"=sprint"'ver'); \ | ||
print}' PKGBUILD.template > PKGBUILD | ||
} | ||
|
||
|
||
# | ||
# MAIN | ||
# | ||
cd "arch" | ||
prepare | ||
makepkg | ||
clean |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,30 @@ | ||
#!/bin/bash | ||
# | ||
# Build installer for linux | ||
# | ||
# When add new distro check other possible release files: | ||
# http://linuxmafia.com/faq/Admin/release-files.html | ||
|
||
# grunt-contrib-copy doesn't preserve permissions | ||
# https://github.com/gruntjs/grunt/issues/615 | ||
chmod 755 debian/package-root/opt/brackets/brackets | ||
chmod 755 debian/package-root/opt/brackets/Brackets | ||
chmod 755 debian/package-root/opt/brackets/Brackets-node | ||
chmod 755 debian/package-root/DEBIAN/prerm | ||
chmod 755 debian/package-root/DEBIAN/postrm | ||
chmod 755 debian/package-root/DEBIAN/postinst | ||
|
||
# set permissions on subdirectories | ||
find debian -type d -exec chmod 755 {} \; | ||
DISTRO="unknown" | ||
|
||
# delete old package | ||
rm -f brackets.deb | ||
|
||
fakeroot dpkg-deb --build debian/package-root | ||
mv debian/package-root.deb brackets.deb | ||
# get distribution name from /etc/*release file | ||
if [[ -f /etc/os-release ]]; then | ||
. /etc/os-release; DISTRO=$ID | ||
elif [[ -f /etc/lsb_release ]]; then | ||
. /etc/lsb_release; DISTRO=$DISTRIB_ID | ||
else | ||
echo "Error: non-standard /etc/*release files are currently not supported" 2>&1 | ||
exit 1 | ||
fi; | ||
|
||
|
||
# run distro-specified builder | ||
if [[ -f ${DISTRO}_builder.sh ]]; then | ||
bash ${DISTRO}_builder.sh | ||
else | ||
echo "Error: ${DISTRO}_builder.sh not found" 2>&1 | ||
echo " Can't build package for distribution \"${DISTRO}\"" 2>&1 | ||
exit 1 | ||
fi; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
VERSION=<%= version %> | ||
MINOR_VERSION=<%= minorVersion %> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
Package: brackets | ||
Version: <%= version %> | ||
Version: | ||
Section: devel | ||
Priority: optional | ||
Architecture: <%= arch %> | ||
Installed-Size: <%= size %> | ||
Architecture: | ||
Installed-Size: | ||
Pre-Depends: dpkg (>= 1.14.0) | ||
Depends: gconf-service, libasound2 (>= 1.0.23), libatk1.0-0 (>= 1.12.4), libc6 (>= 2.11), libcairo2 (>= 1.6.0), libcups2 (>= 1.4.0), libdbus-1-3 (>= 1.2.14), libexpat1 (>= 1.95.8), libfontconfig1 (>= 2.8.0), libfreetype6 (>= 2.3.9), libgcc1 (>= 1:4.1.1), libgconf-2-4 (>= 2.31.1), libgcrypt11 (>= 1.4.5), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.18.0), libgtk2.0-0 (>= 2.24.0), libnspr4 (>= 1.8.0.10), libnss3 (>= 3.12.6), libpango1.0-0 (>= 1.22.0), libstdc++6 (>= 4.6), libudev0 (>= 147) | libudev1 (>= 198), libx11-6 (>= 2:1.4.99.1), libxcomposite1 (>= 1:0.3-1), libxdamage1 (>= 1:1.1), libxext6, libxfixes3, libxrandr2 (>= 2:1.2.0), libxrender1, ca-certificates, libcurl3, lsb-base (>= 3.2), xdg-utils (>= 1.0.2), wget | ||
Maintainer: Brackets Team <[email protected]> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What/Where is
brackets-lib
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package from aur fix mess with some libraries names. Symlinks should have own packages, because of possibility of breaking system after uninstalling package with symlinks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason
brackets-lib
needs to be a separate package? Can we consolidate that into this single package?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasonsanjose I created this package because to clean up the package and other packages can use it too.