diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..173454b --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +# Created by .ignore support plugin (hsz.mobi) +### Example user template template +### Example user template + +# IntelliJ project files +.idea +*.iml +out +gen diff --git a/build/Dockerfile b/build/Dockerfile new file mode 100644 index 0000000..8620f35 --- /dev/null +++ b/build/Dockerfile @@ -0,0 +1,13 @@ +FROM fedora:28 + +RUN dnf update -y +RUN dnf install -y rpmdevtools boost-devel desktop-file-utils \ + gcc-c++ qt-devel make openssh-clients + +RUN mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} + +COPY . /opt/launchy + +WORKDIR /opt/launchy + +#CMD make build \ No newline at end of file diff --git a/build/Makefile b/build/Makefile new file mode 100644 index 0000000..190faf3 --- /dev/null +++ b/build/Makefile @@ -0,0 +1,6 @@ + +all: build + +build: + spectool -C ~/rpmbuild/SOURCES --get-files --sources --patches launchy.spec + rpmbuild -bb launchy.spec \ No newline at end of file diff --git a/build/README.md b/build/README.md new file mode 100644 index 0000000..b20705c --- /dev/null +++ b/build/README.md @@ -0,0 +1,39 @@ +Building +======== + +Fedora +------ +This will build Launchy in a Fedora Docker container. You can then take the RPMs +generated and upload them to your repo of choice. + +1) Update ```launchy.spec``` with the appropriate build/release info. Don't +forget the changelog too! + +2) Specify the correct version in the ```Dockerfile```. + +3) Build the image for the specific version of Fedora. + ```bash + sudo docker build --tag launchy:fc28 . + ``` + +4) Launch an instance + ```bash + sudo docker run --name launchy-fc28 -it launchy:fc28 /bin/bash + ``` + +5) Run the build + ```bash + make build + ``` + +6) Do something with the RPMs + @TODO Someday this will be automated. + ``` + [root@f71523fae13a launchy]# ls -l /root/rpmbuild/RPMS/x86_64/ + total 2684 + -rw-r--r--. 1 root root 569484 May 1 19:24 launchy-2.6-05.fc28.x86_64.rpm + -rw-r--r--. 1 root root 2033496 May 1 19:24 launchy-debuginfo-2.6-05.fc28.x86_64.rpm + -rw-r--r--. 1 root root 119028 May 1 19:24 launchy-debugsource-2.6-05.fc28.x86_64.rpm + -rw-r--r--. 1 root root 15200 May 1 19:24 launchy-devel-2.6-05.fc28.x86_64.rpm + [root@f71523fae13a launchy]# scp -r /root/rpmbuild/RPMS/x86_64/* gcohoe@172.17.0.1:/tmp/ + ``` \ No newline at end of file diff --git a/build/launchy.spec b/build/launchy.spec new file mode 100644 index 0000000..56f9005 --- /dev/null +++ b/build/launchy.spec @@ -0,0 +1,190 @@ +Name: launchy +Version: 2.6 +Release: 05%{?dist} +Summary: Custom spin of the Open Source Keystroke Launcher + +Group: Applications/File +License: GPL+ +URL: http://www.launchy.net +Source0: https://github.com/cohoe/launchy/archive/2.6.tar.gz + + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: gcc-c++ +BuildRequires: qt-devel boost-devel +BuildRequires: desktop-file-utils + +%description +Launchy is a free cross-platform utility designed to help you forget about your +start menu, the icons on your desktop, and even your file manager. +Launchy indexes the programs in your start menu and can launch your documents, +project files, folders, and bookmarks with just a few keystrokes! +This release has several bug fixes. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +The %{name}-devel package contains libraries and header files +for developing applications that use %{name}. + + +%prep +%setup -q +# convert DOS to UNIX +%{__sed} -i 's/\r//' LICENSE.txt readmes/readme.txt + + +%build +%{_libdir}/qt4/bin/qmake "CONFIG+=debug" Launchy.pro +make %{?_smp_mflags} + + +%install +%{__rm} -rf %{buildroot} +# prefix is hardcoded in the makefile +install -Dpm 0755 debug/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name} +mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins +install -Dpm 0755 debug/plugins/*so $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/ +install -Dpm 0755 release/plugins/*so $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/ +mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/icons/ +install -Dpm 0644 plugins/*/*png $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/icons/ +mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps/ +install -Dpm 0644 misc/Launchy_Icon/launchy_icon.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/ +mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/ +install -dpm 0755 skins $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/ +install -dpm 0755 skins/Black_Glass $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/Black_Glass +install -dpm 0755 skins/Spotlight_Wide $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/Spotlight_Wide +install -dpm 0755 skins/Simple $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/Simple +install -dpm 0755 skins/Note $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/Note +install -dpm 0755 skins/Default $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/Default +install -dpm 0755 skins/Mercury_Wide $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/Mercury_Wide +install -dpm 0755 skins/Black_Glass_Wide $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/Black_Glass_Wide +install -dpm 0755 skins/Mercury $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/Mercury +install -dpm 0755 skins/QuickSilver2 $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/QuickSilver2 +install -Dpm 0644 skins/Black_Glass/* $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/Black_Glass +install -Dpm 0644 skins/Spotlight_Wide/* $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/Spotlight_Wide +install -Dpm 0644 skins/Simple/* $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/Simple +install -Dpm 0644 skins/Note/* $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/Note +install -Dpm 0644 skins/Default/* $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/Default +install -Dpm 0644 skins/Mercury_Wide/* $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/Mercury_Wide +install -Dpm 0644 skins/Black_Glass_Wide/* $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/Black_Glass_Wide +install -Dpm 0644 skins/Mercury/* $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/Mercury +install -Dpm 0644 skins/QuickSilver2/* $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/QuickSilver2 +install -dm 0755 $RPM_BUILD_ROOT%{_includedir}/%{name} +install -Dpm 0644 "Plugin API"/*.h $RPM_BUILD_ROOT%{_includedir}/%{name} +desktop-file-install \ + --dir $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart \ + --add-only-show-in=GNOME \ + linux/%{name}.desktop +desktop-file-install \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + --remove-category Application \ + linux/%{name}.desktop + +# autostart is disabled by default +echo "X-GNOME-Autostart-enabled=false" >> \ + $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/%{name}.desktop + + +%postun +touch --no-create %{_datadir}/icons/hicolor +if [ -x %{_bindir}/gtk-update-icon-cache ] ; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : +fi + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt readmes/readme.txt +%{_bindir}/%{name} +%{_libdir}/%{name}/ +%{_datadir}/%{name}/ +%{_datadir}/pixmaps/launchy_icon.png +%{_datadir}/applications/%{name}.desktop +%config(noreplace) %{_sysconfdir}/xdg/autostart/%{name}.desktop + + +%files devel +%defattr(-,root,root,-) +%{_includedir}/%{name}/*.h + + +%changelog +* Tue May 01 2018 Grant Cohoe - 2.6-05 +- Rebuild for FC28 + +* Sat Mar 03 2018 Grant Cohoe - 2.6-04 +- Rebuild for FC27 + +* Tue Aug 08 2017 Grant Cohoe - 2.6-03 +- Rebuild for FC26 + +* Thu May 11 2017 Grant Cohoe - 2.6-02 +- Bugfixes and RPM changelog. + +* Thu Feb 04 2016 Fedora Release Engineering - 2.5-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jan 15 2016 Jonathan Wakely - 2.5-18 +- Rebuilt for Boost 1.60 + +* Thu Aug 27 2015 Jonathan Wakely - 2.5-17 +- Rebuilt for Boost 1.59 + +* Wed Jul 29 2015 Fedora Release Engineering - 2.5-16 +- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 + +* Wed Jul 22 2015 David Tardon - 2.5-15 +- rebuild for Boost 1.58 + +* Wed Jun 17 2015 Fedora Release Engineering - 2.5-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 02 2015 Kalev Lember - 2.5-13 +- Rebuilt for GCC 5 C++11 ABI change + +* Tue Jan 27 2015 Petr Machata - 2.5-12 +- Rebuild for boost 1.57.0 + +* Sun Aug 17 2014 Fedora Release Engineering - 2.5-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 2.5-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 23 2014 Petr Machata - 2.5-9 +- Rebuild for boost 1.55.0 + +* Sat Aug 03 2013 Fedora Release Engineering - 2.5-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 30 2013 Petr Machata - 2.5-7 +- Rebuild for boost 1.54.0 + +* Thu Feb 14 2013 Fedora Release Engineering - 2.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jul 19 2012 Fedora Release Engineering - 2.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 2.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Sep 06 2010 Lukas Zapletal - 2.5-3 +- review by msuchy + +* Mon Sep 06 2010 Lukas Zapletal - 2.5-2 +- correcting XDG icon path + +* Mon Sep 06 2010 Lukas Zapletal - 2.5-1 +- initial package