Package Brackets

This forum is dedicated to new ideas, suggestions and proposals.

Package Brackets

Postby egoitzro » Dec 1st, '14, 17:33

I do not know if this is the place to request to create the packages needed to enjoy this software.
Brackets is like Windows or Mac Dreamweaver from Adobe. Is a free open-source editor written in HTML, CSS, and JavaScript with a primary focus on Web Development. It was created by Adobe Systems, licensed under the MIT License.

Brackets source code: https://github.com/adobe/brackets
Last edited by doktor5000 on Dec 1st, '14, 21:16, edited 1 time in total.
Reason: fixed typo
egoitzro
 
Posts: 36
Joined: Nov 16th, '13, 15:40

Re: Package Brackets

Postby doktor5000 » Dec 1st, '14, 21:15

Please report that as a package request, after searching if it hasn't been reported yet already:
https://wiki.mageia.org/en/How_to_repor ... ge_request
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Package Brackets

Postby egoitzro » Dec 1st, '14, 23:02

Thank you.
egoitzro
 
Posts: 36
Joined: Nov 16th, '13, 15:40

Re: Package Brackets

Postby jkerr82508 » Dec 2nd, '14, 00:19

It's helpful to quote the bug report number, in case any other forum users are interested in that software and want to comment in the bug report. The best way is to show a direct link to the bug report, like this:
https://bugs.mageia.org/show_bug.cgi?id=14705

Jim
jkerr82508
 
Posts: 946
Joined: Mar 26th, '11, 01:34
Location: Fife, Scotland

Re: Package Brackets

Postby napcok » Dec 2nd, '14, 12:28

Brackets rpm package from Fedora works for me in Cauldron. You can find them here -> http://copr-be.cloud.fedoraproject.org/ ... /brackets/

I also tried to build rpm on Cauldron using spec from https://github.com/jgillich/brackets-rpm.
But I have no luck so far.
napcok
 
Posts: 19
Joined: Aug 15th, '11, 13:39
Location: Poland, Dąbrowa Górnicza

Re: Package Brackets

Postby egoitzro » Dec 2nd, '14, 13:34

napcok wrote:Brackets rpm package from Fedora works for me in Cauldron. You can find them here -> http://copr-be.cloud.fedoraproject.org/ ... /brackets/

I also tried to build rpm on Cauldron using spec from https://github.com/jgillich/brackets-rpm.
But I have no luck so far.



Thank you. I'll try it, although dependency issue will always be better if it is packaged for the distro that you use.
egoitzro
 
Posts: 36
Joined: Nov 16th, '13, 15:40

Re: Package Brackets

Postby egoitzro » Dec 5th, '14, 00:00

napcok wrote:Brackets rpm package from Fedora works for me in Cauldron. You can find them here -> http://copr-be.cloud.fedoraproject.org/ ... /brackets/

I also tried to build rpm on Cauldron using spec from https://github.com/jgillich/brackets-rpm.
But I have no luck so far.


Using the spec of the page you mentioned and downloading git code I managed after many attempts to build a rpm package for mageia
egoitzro
 
Posts: 36
Joined: Nov 16th, '13, 15:40

Re: Package Brackets

Postby napcok » Dec 5th, '14, 16:59

egoitzro wrote:Using the spec of the page you mentioned and downloading git code I managed after many attempts to build a rpm package for mageia


Thats good news :)
Can you attach your spec file to bugreport?
Maybe someone from packagers team can look at it then and even import it to official repositories.
napcok
 
Posts: 19
Joined: Aug 15th, '11, 13:39
Location: Poland, Dąbrowa Górnicza

Re: Package Brackets

Postby egoitzro » Dec 5th, '14, 23:23

napcok wrote:
egoitzro wrote:Using the spec of the page you mentioned and downloading git code I managed after many attempts to build a rpm package for mageia


Thats good news :)
Can you attach your spec file to bugreport?
Maybe someone from packagers team can look at it then and even import it to official repositories.


brackets.spec
Code: Select all
Name: brackets
Version: 1.0
Release: 1%{?dist}
Summary: An open source code editor for the web, written in JavaScript, HTML and CSS.
Group: Development/Tools
License: MIT
URL: http://brackets.io/
# The sources for this package were pulled from upstream's vcs.
# Use the fetch_source.sh to download them.
Source0: brackets-shell-%{version}.tar.gz
Source1: brackets-%{version}.tar.gz
Requires: nodejs, gtk2, alsa-lib, GConf2, libgcrypt
BuildRequires: %{requires}, gtk2-devel, npm, nspr, gyp, desktop-file-utils
AutoReqProv: no
%global _enable_debug_package 0
%global debug_package %{nil}
%global __os_install_post /usr/lib/rpm/brp-compress %{nil}
%description
%prep
%setup -n brackets-shell
%setup -T -D -b 1 -n brackets
%build
%ifarch x86_64
LD_PRELOAD=/usr/lib64/libudev.so.1
%else
LD_PRELOAD=/usr/lib/libudev.so.1
%endif
cd %{_builddir}/brackets
npm install && npm install grunt-cli
./node_modules/.bin/grunt clean less targethtml useminPrepare htmlmin requirejs concat copy usemin
cp -a src/config.json dist/config.json
cd %{_builddir}/brackets-shell
npm install && npm install grunt-cli
./node_modules/.bin/grunt setup full-build
%install
mkdir --parents %{buildroot}%{_datadir}/%{name}
cp -a %{_builddir}/brackets-shell/installer/linux/debian/package-root/opt/brackets/. %{buildroot}%{_datadir}/%{name}
cp -a %{_builddir}/brackets-shell/installer/linux/debian/package-root/usr/share/icons %{buildroot}%{_datadir}/
mkdir --parents %{buildroot}%{_bindir}
ln -sf %{_datadir}/%{name}/brackets %{buildroot}%{_bindir}/%{name}
mkdir --parents %{buildroot}%{_datadir}/applications
cat <<EOT >> %{buildroot}%{_datadir}/applications/%{name}.desktop
[Desktop Entry]
Name=Brackets
Type=Application
Categories=Development
Exec=brackets %U
Icon=brackets
MimeType=text/html;
Keywords=Text;Editor;Write;Web;Development;
EOT
desktop-file-install --mode 0644 %{buildroot}%{_datadir}/applications/%{name}.desktop
%ifarch x86_64
ln -sf /usr/lib64/libudev.so.1 %{buildroot}%{_datadir}/%{name}/libudev.so.0
%else
ln -sf /usr/lib/libudev.so.1 %{buildroot}%{_datadir}/%{name}/libudev.so.0
%endif
%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/update-desktop-database &> /dev/null || :
%postun
if [ $1 -eq 0 ] ; then
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
/usr/bin/update-desktop-database &> /dev/null || :
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files
%dir %{_datadir}/%{name}/
%{_datadir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/*/*/*/*.svg
%attr(755, root, root) %{_datadir}/%{name}/brackets
%attr(755, root, root) %{_datadir}/%{name}/Brackets
%attr(755, root, root) %{_datadir}/%{name}/Brackets-node
%attr(755, root, root) %{_bindir}/%{name}
%changelog
egoitzro
 
Posts: 36
Joined: Nov 16th, '13, 15:40

Re: Package Brackets

Postby doktor5000 » Dec 5th, '14, 23:54

I've made a few corrections. FWIW, the library Requires on alsa-lib and libgcrypt are not OK, as those should be caught via rpm scanning automatically the required libraries.
Also those hacks regarding libudev.so and finally symlinking it into /usr/share/libudev.so.0 seems pretty wrong.
Although I've not had time to look at it further, just some comments.

egoitzro wrote:
Name: brackets
Version: 1.0
Release: %mkrel 1
Summary: An open source code editor for the web, written in JavaScript, HTML and CSS.
Group: Development/Tools
License: MIT
URL: http://brackets.io/
# The sources for this package were pulled from upstream's vcs.
# Use the fetch_source.sh to download them.
Source0: brackets-shell-%{version}.tar.gz
Source1: brackets-%{version}.tar.gz
Requires: nodejs
Requires: gtk2
Requires: alsa-lib
Requires: GConf2
Requires: libgcrypt
BuildRequires: %{requires}, gtk2-devel, npm, nspr, gyp, desktop-file-utils
AutoReqProv: no

%global __os_install_post /usr/lib/rpm/brp-compress %{nil}

%description
Brackets is an open source code editor for the web, written in JavaScript, HTML and CSS.

%prep
%setup -n brackets-shell
%setup -T -D -b 1 -n brackets
%build
%ifarch x86_64
LD_PRELOAD=/usr/lib64/libudev.so.1
%else
LD_PRELOAD=/usr/lib/libudev.so.1
%endif
cd %{_builddir}/brackets
npm install && npm install grunt-cli
./node_modules/.bin/grunt clean less targethtml useminPrepare htmlmin requirejs concat copy usemin
cp -a src/config.json dist/config.json
cd %{_builddir}/brackets-shell
npm install && npm install grunt-cli
./node_modules/.bin/grunt setup full-build
%install
mkdir --parents %{buildroot}%{_datadir}/%{name}
cp -a %{_builddir}/brackets-shell/installer/linux/debian/package-root/opt/brackets/. %{buildroot}%{_datadir}/%{name}
cp -a %{_builddir}/brackets-shell/installer/linux/debian/package-root/usr/share/icons %{buildroot}%{_datadir}/
mkdir --parents %{buildroot}%{_bindir}
ln -sf %{_datadir}/%{name}/brackets %{buildroot}%{_bindir}/%{name}
mkdir --parents %{buildroot}%{_datadir}/applications
cat <<EOT >> %{buildroot}%{_datadir}/applications/%{name}.desktop
[Desktop Entry]
Name=Brackets
Type=Application
Categories=Development
Exec=brackets %U
Icon=brackets
MimeType=text/html;
Keywords=Text;Editor;Write;Web;Development;
EOT
desktop-file-install --mode 0644 %{buildroot}%{_datadir}/applications/%{name}.desktop
%ifarch x86_64
ln -sf /usr/lib64/libudev.so.1 %{buildroot}%{_datadir}/%{name}/libudev.so.0
%else
ln -sf /usr/lib/libudev.so.1 %{buildroot}%{_datadir}/%{name}/libudev.so.0
%endif

%files
%dir %{_datadir}/%{name}/
%{_datadir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/*/*/*/*.svg
%attr(755, root, root) %{_datadir}/%{name}/brackets
%attr(755, root, root) %{_datadir}/%{name}/Brackets
%attr(755, root, root) %{_datadir}/%{name}/Brackets-node
%attr(755, root, root) %{_bindir}/%{name}
%changelog
[/code]
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Package Brackets

Postby egoitzro » Dec 6th, '14, 01:02

I have no knowledge to this so the only thing I've done is take the code https://github.com/jgillich/brackets-rp ... ckets.spec and try to make the rpm, maybe I have done wrong, but I built the rpm and it has worked.

Thank you for your corrections and your comments
Last edited by doktor5000 on Dec 6th, '14, 01:40, edited 1 time in total.
Reason: removed fullquote
egoitzro
 
Posts: 36
Joined: Nov 16th, '13, 15:40

Re: Package Brackets

Postby doktor5000 » Dec 6th, '14, 01:40

No problem, was not really directed at you :)

Please next time do not use fullquotes, but only use the Reply function. Greatly improves clarity and reading flow ;)
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Package Brackets

Postby egoitzro » Dec 6th, '14, 11:24

OK
egoitzro
 
Posts: 36
Joined: Nov 16th, '13, 15:40


Return to Ideas and suggestions

Who is online

Users browsing this forum: No registered users and 1 guest

cron