diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b02adb0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/release-0.20.0.tar.gz diff --git a/FindUtf8proc.cmake b/FindUtf8proc.cmake new file mode 100644 index 0000000..c41795f --- /dev/null +++ b/FindUtf8proc.cmake @@ -0,0 +1,15 @@ +# Find utf8proc +# +# UTF8PROC_INCLUDE_DIR +# UTF8PROC_LIBRARY +# UTF8PROC_FOUND +# + +FIND_PATH(UTF8PROC_INCLUDE_DIR NAMES utf8proc.h) + +FIND_LIBRARY(UTF8PROC_LIBRARY NAMES utf8proc) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(UTF8PROC DEFAULT_MSG UTF8PROC_LIBRARY UTF8PROC_INCLUDE_DIR) + +MARK_AS_ADVANCED(UTF8PROC_INCLUDE_DIR UTF8PROC_LIBRARY) diff --git a/dead.package b/dead.package deleted file mode 100644 index 5204a84..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Orphaned for 6+ weeks diff --git a/sources b/sources new file mode 100644 index 0000000..fe76170 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +83fc7d79f3a17623674adb7e0d7c9fb9 release-0.20.0.tar.gz diff --git a/wcm-0.19.0.1.patch b/wcm-0.19.0.1.patch new file mode 100644 index 0000000..fc77aa2 --- /dev/null +++ b/wcm-0.19.0.1.patch @@ -0,0 +1,51 @@ +--- install-files/share/applications/wcm.desktop.orig 2015-02-23 12:12:31.000000000 +0300 ++++ install-files/share/applications/wcm.desktop 2015-03-10 18:36:25.932842426 +0300 +@@ -6,46 +6,6 @@ + Exec=wcm + TryExec=wcm + Terminal=false +-Categories=Utility;FileManager; ++Categories=Utility;FileTools; + Icon=wcm + StartupNotify=true +- +-[Desktop Action NewWindow] +-Name=Open a New Window +-Name[ast]=Abrir una Ventana Nueva +-Name[bg]=Отваряне на Нов прозорец +-Name[bn]=একটি নতুন উইন্ডো খুলুন +-Name[bs]=Otvori novi prozor +-Name[ca]=Obre una finestra nova +-Name[ca@valencia]=Obri una finestra nova +-Name[da]=Åbn et nyt vindue +-Name[de]=Ein neues Fenster öffnen +-Name[en_AU]=Open a New Window +-Name[eo]=Malfermi novan fenestron +-Name[es]=Abrir una ventana nueva +-Name[et]=Ava uus aken +-Name[eu]=Ireki leiho berria +-Name[fi]=Avaa uusi ikkuna +-Name[fr]=Ouvrir une nouvelle fenêtre +-Name[gl]=Abrir unha nova xanela +-Name[he]=פתיחת חלון חדש +-Name[hy]=Բացել նոր պատուհան +-Name[ia]=Aperi un nove fenestra +-Name[it]=Apri una nuova finestra +-Name[ja]=新しいウィンドウを開く +-Name[ka]=ახალი ფანჯრის გახსნა +-Name[kw]=Egery fenester noweth +-Name[ms]=Buka Tetingkap Baru +-Name[nb]=Åpne et nytt vindu +-Name[nl]=Nieuw venster openen +-Name[pt_BR]=Abre uma nova janela +-Name[ro]=Deschide o fereastră nouă +-Name[ru]=Открыть новое окно +-Name[sl]=Odpri novo okno +-Name[sv]=Öppna ett nytt fönster +-Name[ug]=يېڭى كۆزنەك ئاچ +-Name[uk]=Відкрити нове вікно +-Name[vi]=Mở cửa sổ mới +-Name[zh_CN]=打开新窗口 +-Name[zh_TW]=開啟新視窗 +-Exec=wcm + diff --git a/wcm-changelog.patch b/wcm-changelog.patch new file mode 100644 index 0000000..d2db8fb --- /dev/null +++ b/wcm-changelog.patch @@ -0,0 +1,13 @@ +--- CHANGELOG.txt 2015-04-25 00:50:22.000000000 +0300 ++++ tmp.txt 2015-08-17 16:24:10.886693549 +0300 +@@ -109,8 +109,8 @@ + Added: numpad keys support while NumLock is disabled + Added: option to turn on/off the 3D UI (buttons, etc) + Added: show '(Root)' in the window caption while running with root privileges +- Added: show inner/trailing spaces in files/folders as the character (option) +- Added: show spaces in input fields as the character ++ Added: show inner/trailing spaces in files/folders as the · character (option) ++ Added: show spaces in input fields as the · character + Added: xprop can report a class name for WCM windows + Hotkey: Ctrl+M to open "Open with" popup + Hotkey: Shift+Tab to switch between controls in dialogs diff --git a/wcm-utf8proc.patch b/wcm-utf8proc.patch new file mode 100644 index 0000000..2481764 --- /dev/null +++ b/wcm-utf8proc.patch @@ -0,0 +1,66 @@ +--- src/CMakeLists.txt.orig 2015-08-13 11:47:34.949824839 +0300 ++++ src/CMakeLists.txt 2015-08-13 12:22:28.068842900 +0300 +@@ -56,6 +56,15 @@ + ELSE(WITH_SMBCLIENT) + MESSAGE(STATUS "smbclient support disabled") + ENDIF(WITH_SMBCLIENT) ++ ++ FIND_PACKAGE(Utf8proc) ++ IF(NOT ${UTF8PROC_FOUND}) ++ MESSAGE(FATAL_ERROR "utf8proc not found.") ++ ENDIF(NOT ${UTF8PROC_FOUND}) ++ ADD_DEFINITIONS(-DUTF8PROC_EXIST) ++ INCLUDE_DIRECTORIES(${UTF8PROC_INCLUDE_DIR}) ++ SET(wcm_LIBS ${wcm_LIBS} ${UTF8PROC_LIBRARY}) ++ MESSAGE(STATUS "utf8proc ok") + ENDIF(MINGW) + + # flags +@@ -66,7 +75,7 @@ + + CONFIGURE_FILE(libconf_ux.h.in libconf_ux.h) # noop, flags are passed via compiler args + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) +-INCLUDE_DIRECTORIES(BEFORE wal swl vfs utf8proc .) ++INCLUDE_DIRECTORIES(BEFORE wal swl vfs .) + ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64) + ADD_DEFINITIONS(-DUNIX_CONFIG_DIR_PATH="${CMAKE_INSTALL_PREFIX}/${DATADIR}") + +@@ -103,7 +112,6 @@ + shell.cpp + swl/swl_wincoreUX.cpp + terminal.cpp +- utf8proc/utf8proc.c + ) + ENDIF(MINGW OR MSVC) + +--- src/makefile.linux.orig 2015-08-13 12:21:35.229402340 +0300 ++++ src/makefile.linux 2015-08-13 12:21:55.071497499 +0300 +@@ -208,7 +208,6 @@ + $(OBJDIR)/wal_sys_api.o\ + $(OBJDIR)/wal_tmpls.o \ + $(OBJDIR)/wcm-config.o \ +- $(OBJDIR)/utf8proc.o \ + $(OBJDIR)/LUrlParser.o + + ifeq ($(UNAME_S),Darwin) +@@ -230,9 +229,6 @@ + # cd libtester && ./libconf.create + + +-$(OBJDIR)/utf8proc.o: $(HW) $(HS) $(HN) src/utf8proc/utf8proc.c +- $(CC) -I uft8/proc -std=c99 -c $(CFLAGS) -Wno-missing-field-initializers src/utf8proc/utf8proc.c -o $(OBJDIR)/utf8proc.o +- + $(OBJDIR)/LUrlParser.o: $(HW) $(HS) $(HN) src/urlparser/LUrlParser.cpp + $(CC) $(COPTS) -c $(CFLAGS) src/urlparser/LUrlParser.cpp -o $(OBJDIR)/LUrlParser.o + +--- src/wal/wal.cpp.orig 2015-04-25 00:50:22.000000000 +0300 ++++ src/wal/wal.cpp 2015-08-13 12:33:19.971388697 +0300 +@@ -12,7 +12,7 @@ + #endif + + #if !defined(_WIN32) +-# include "utf8proc/utf8proc.h" ++# include + #endif + + #include diff --git a/wcm.1 b/wcm.1 new file mode 100644 index 0000000..8b0733f --- /dev/null +++ b/wcm.1 @@ -0,0 +1,34 @@ +.TH "wcm" "1" "0.20.0" "ti.eugene@gmail.com" "File manager" +.SH "NAME" +.LP +wcm \- WCM Commander. +.SH "SYNTAX" +.LP +wcm [\fIoption\fP] +.SH "DESCRIPTION" +.LP +Multi\-platform open source file manager mimicking the look\-n\-feel of Far Manager. +.SH "OPTIONS" +.LP +.TP +\fB\-\-view\fR <\fIfilename\fP> +View the specified file. +.TP +\fB\-\-help\fR +Output help information and exit. +.SH "FILES" +.LP +\fI/usr/shares/wc/lang\fP +Translations +.br +\fI/usr/shares/wc/styles\fP +Styles +.SH "EXAMPLES" +.LP +To run this program the standard way type: +.LP +wcm + +.SH "AUTHORS" +.LP +Authors and contributors are listed in the Contributors.txt. diff --git a/wcm.appdata.xml b/wcm.appdata.xml new file mode 100644 index 0000000..7fab9f2 --- /dev/null +++ b/wcm.appdata.xml @@ -0,0 +1,13 @@ + + + wcm.desktop + CC0 + MIT + WCM Commander + FAR-like file manager + +

File manager mimicking the look-n-feel of Far Manager.

+
+ https://github.com/corporateshark/WalCommander + https://github.com/corporateshark/WCMCommander/issues +
\ No newline at end of file diff --git a/wcm.spec b/wcm.spec new file mode 100644 index 0000000..01d094c --- /dev/null +++ b/wcm.spec @@ -0,0 +1,145 @@ +%global _hardened_build 1 +%global cmake_pkg cmake +%if 0%{?rhel} +%if 0%{?rhel} < 7 +%global cmake_pkg cmake28 +%endif +%endif + +Name: wcm +Version: 0.20.0 +Release: 4%{?dist} +Summary: WCM Commander +License: MIT +Url: https://github.com/corporateshark/WalCommander +Source0: https://github.com/corporateshark/WalCommander/archive/release-%{version}.tar.gz +# https://github.com/corporateshark/WCMCommander/issues/505 +Source1: %{name}.appdata.xml +# https://github.com/corporateshark/WCMCommander/issues/504 +Source3: wcm.1 +# https://github.com/corporateshark/WCMCommander/issues/508 +Patch0: %{name}-0.19.0.1.patch +# https://github.com/corporateshark/WCMCommander/issues/503 +Source2: FindUtf8proc.cmake +Patch1: wcm-utf8proc.patch +BuildRequires: utf8proc-devel +# https://github.com/corporateshark/WCMCommander/issues/507 +Patch2: wcm-changelog.patch +BuildRequires: %{cmake_pkg} >= 2.8 +BuildRequires: desktop-file-utils +# libsmbclient-devel +BuildRequires: pkgconfig(smbclient) +# libssh2-devel +BuildRequires: pkgconfig(libssh2) +# freetype-devel +BuildRequires: pkgconfig(freetype2) +# libX11-devel +BuildRequires: pkgconfig(x11) +BuildRequires: ImageMagick +%if 0%{?fedora} +BuildRequires: libappstream-glib +%endif +Requires: hicolor-icon-theme + + +%description +File manager mimicking the look-n-feel of Far Manager. + + +%prep +%setup0 -q -n WCMCommander-release-%{version} +%patch0 -p 0 +%if 0%{?fedora} +%patch1 -p 0 +cp %{SOURCE2} cmake/ +rm -rf src/utf8proc +%endif +%patch2 -p 0 +# https://github.com/corporateshark/WCMCommander/issues/490 +rm -rf install-files/share/wcm/fonts +rm -rf libssh2 +# https://github.com/corporateshark/WCMCommander/issues/506 +rm -f install-files/share/wcm/styles/solarize* +rm -f tools/* + + +%build +mkdir build +pushd build +%{?cmake28}%{!?cmake28:%{?cmake}} \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo %cmakeflags .. +make %{?_smp_mflags} +popd + + +%install +pushd build +%{make_install} +popd +desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop +# appdata +install -Dm 0644 %{SOURCE1} %{buildroot}/%{_datadir}/appdata/wcm.appdata.xml +%if 0%{?fedora} +appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/wcm.appdata.xml +%endif +# additional icons +# https://github.com/corporateshark/WCMCommander/issues/371 +for i in 16x16 22x22 24x24 32x32 48x48 64x64 72x72 96x96 128x128 +do + mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/$i/apps + convert install-files/share/pixmaps/wcm.png -resize $i %{buildroot}/%{_datadir}/icons/hicolor/$i/apps/wcm.png; +done +install -Dm 0644 %{SOURCE3} %{buildroot}/%{_mandir}/man1/%{name}.1.gz + + +%post +/usr/bin/update-desktop-database &> /dev/null || : + + +%postun +if [ $1 -eq 0 ] ; then + /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 +%doc CHANGELOG.txt Contributors.txt README.md +%license LICENSE +%{_bindir}/%{name} +%{_datadir}/%{name}/ +%{_datadir}/applications/%{name}.desktop +%{_datadir}/appdata/%{name}.appdata.xml +%{_datadir}/pixmaps/%{name}.png +%{_datadir}/icons/hicolor/*/apps/%{name}.png +%{_mandir}/man1/%{name}.1* + + +%changelog +* Mon Aug 17 2015 TI_Eugene 0.20.0-4 +- hicolor-icon-theme added as Requires +- fixed source tarball name +- post, postun and posttrans fixes +- some unwanted files removed +- generic man added + +* Thu Aug 13 2015 TI_Eugene 0.20.0-3 +- system utf8proc + +* Wed Aug 12 2015 TI_Eugene 0.20.0-2 +- wcm.appdata.xml added +- additional icons added + +* Tue May 05 2015 TI_Eugene 0.20.0-1 +- Version bump + +* Mon Dec 15 2014 TI_Eugene 0.18.0-1 +- Version bump +- Minor spec fixes. + +* Wed Oct 08 2014 TI_Eugene 0.17.0-1 +- initial packaging