Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup build system #191

Closed
wants to merge 6 commits into from
Closed

Cleanup build system #191

wants to merge 6 commits into from

Conversation

Murmele
Copy link
Owner

@Murmele Murmele commented Jun 10, 2022

  • Test Windows
  • Test flatpak
  • Test PKG Build on Arch linux

fixes #167

@alerque
Copy link
Contributor

alerque commented Jun 10, 2022

Test building now...

@Murmele
Copy link
Owner Author

Murmele commented Jun 10, 2022

@alerque

...on second thought, the CMAKE_INSTALL_PREFIX is almost certainly a heterodox usage, that should be just /usr instead of /usr/lib/gittyup like it needs to be right now. And then things like the MANDIR (and proposed DATADIR) should probably use the prefix plus their own bit of path. At least that's how these vars would be expected to behave in autotools builds, I'm not sure about the cmake idiomatic usage.

Yes this will be prepended to every install() command (cmake)
So I think you have to set the install prefix to /usr
then the Resources will be installed in ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_PREFIX}/Resources

@alerque
Copy link
Contributor

alerque commented Jun 10, 2022

The CMAKE_INSTALL_PREFIX is not being used as you describe above...

cmake ...
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D DATA_INSTALL_PREFIX=/share/gittyup \
	...

And I ended up with some files in /share/gittyup/Resources and some in /usr/Resources, neither of which are correct.

With those build options here is the full file list ninja install tries to place:

file list
/share/
/share/gittyup/
/share/gittyup/Resources/
/share/gittyup/Resources/acknowledgments.html
/share/gittyup/Resources/changelog.html
/share/gittyup/Resources/credential.lua
/share/gittyup/Resources/dictionaries/
/share/gittyup/Resources/dictionaries/Source.txt
/share/gittyup/Resources/dictionaries/de_DE_frami.aff
/share/gittyup/Resources/dictionaries/de_DE_frami.dic
/share/gittyup/Resources/dictionaries/en_US.aff
/share/gittyup/Resources/dictionaries/en_US.dic
/share/gittyup/Resources/dictionaries/es_ANY.aff
/share/gittyup/Resources/dictionaries/es_ANY.dic
/share/gittyup/Resources/dictionaries/pt_BR.aff
/share/gittyup/Resources/dictionaries/pt_BR.dic
/share/gittyup/Resources/editor.lua
/share/gittyup/Resources/emoji.json
/share/gittyup/Resources/global.lua
/share/gittyup/Resources/lexers.lua
/share/gittyup/Resources/lexers/
/share/gittyup/Resources/lexers/actionscript.lua
/share/gittyup/Resources/lexers/ada.lua
/share/gittyup/Resources/lexers/ansi_c.lua
/share/gittyup/Resources/lexers/antlr.lua
/share/gittyup/Resources/lexers/apdl.lua
/share/gittyup/Resources/lexers/apl.lua
/share/gittyup/Resources/lexers/applescript.lua
/share/gittyup/Resources/lexers/asm.lua
/share/gittyup/Resources/lexers/asp.lua
/share/gittyup/Resources/lexers/autoit.lua
/share/gittyup/Resources/lexers/awk.lua
/share/gittyup/Resources/lexers/bash.lua
/share/gittyup/Resources/lexers/batch.lua
/share/gittyup/Resources/lexers/bibtex.lua
/share/gittyup/Resources/lexers/boo.lua
/share/gittyup/Resources/lexers/caml.lua
/share/gittyup/Resources/lexers/chuck.lua
/share/gittyup/Resources/lexers/clojure.lua
/share/gittyup/Resources/lexers/cmake.lua
/share/gittyup/Resources/lexers/coffeescript.lua
/share/gittyup/Resources/lexers/container.lua
/share/gittyup/Resources/lexers/context.lua
/share/gittyup/Resources/lexers/cpp.lua
/share/gittyup/Resources/lexers/crystal.lua
/share/gittyup/Resources/lexers/csharp.lua
/share/gittyup/Resources/lexers/css.lua
/share/gittyup/Resources/lexers/cuda.lua
/share/gittyup/Resources/lexers/dart.lua
/share/gittyup/Resources/lexers/desktop.lua
/share/gittyup/Resources/lexers/diff.lua
/share/gittyup/Resources/lexers/django.lua
/share/gittyup/Resources/lexers/dmd.lua
/share/gittyup/Resources/lexers/dockerfile.lua
/share/gittyup/Resources/lexers/dot.lua
/share/gittyup/Resources/lexers/eiffel.lua
/share/gittyup/Resources/lexers/elixir.lua
/share/gittyup/Resources/lexers/elm.lua
/share/gittyup/Resources/lexers/erlang.lua
/share/gittyup/Resources/lexers/fantom.lua
/share/gittyup/Resources/lexers/faust.lua
/share/gittyup/Resources/lexers/fennel.lua
/share/gittyup/Resources/lexers/fish.lua
/share/gittyup/Resources/lexers/forth.lua
/share/gittyup/Resources/lexers/fortran.lua
/share/gittyup/Resources/lexers/fsharp.lua
/share/gittyup/Resources/lexers/fstab.lua
/share/gittyup/Resources/lexers/gap.lua
/share/gittyup/Resources/lexers/gettext.lua
/share/gittyup/Resources/lexers/gherkin.lua
/share/gittyup/Resources/lexers/glsl.lua
/share/gittyup/Resources/lexers/gnuplot.lua
/share/gittyup/Resources/lexers/go.lua
/share/gittyup/Resources/lexers/groovy.lua
/share/gittyup/Resources/lexers/gtkrc.lua
/share/gittyup/Resources/lexers/haskell.lua
/share/gittyup/Resources/lexers/html.lua
/share/gittyup/Resources/lexers/icon.lua
/share/gittyup/Resources/lexers/idl.lua
/share/gittyup/Resources/lexers/inform.lua
/share/gittyup/Resources/lexers/ini.lua
/share/gittyup/Resources/lexers/io_lang.lua
/share/gittyup/Resources/lexers/java.lua
/share/gittyup/Resources/lexers/javascript.lua
/share/gittyup/Resources/lexers/jq.lua
/share/gittyup/Resources/lexers/json.lua
/share/gittyup/Resources/lexers/jsp.lua
/share/gittyup/Resources/lexers/julia.lua
/share/gittyup/Resources/lexers/latex.lua
/share/gittyup/Resources/lexers/ledger.lua
/share/gittyup/Resources/lexers/less.lua
/share/gittyup/Resources/lexers/lexer.lua
/share/gittyup/Resources/lexers/lilypond.lua
/share/gittyup/Resources/lexers/lisp.lua
/share/gittyup/Resources/lexers/litcoffee.lua
/share/gittyup/Resources/lexers/logtalk.lua
/share/gittyup/Resources/lexers/lua.lua
/share/gittyup/Resources/lexers/makefile.lua
/share/gittyup/Resources/lexers/man.lua
/share/gittyup/Resources/lexers/markdown.lua
/share/gittyup/Resources/lexers/matlab.lua
/share/gittyup/Resources/lexers/mediawiki.lua
/share/gittyup/Resources/lexers/meson.lua
/share/gittyup/Resources/lexers/moonscript.lua
/share/gittyup/Resources/lexers/myrddin.lua
/share/gittyup/Resources/lexers/nemerle.lua
/share/gittyup/Resources/lexers/networkd.lua
/share/gittyup/Resources/lexers/nim.lua
/share/gittyup/Resources/lexers/nsis.lua
/share/gittyup/Resources/lexers/null.lua
/share/gittyup/Resources/lexers/objective_c.lua
/share/gittyup/Resources/lexers/pascal.lua
/share/gittyup/Resources/lexers/perl.lua
/share/gittyup/Resources/lexers/php.lua
/share/gittyup/Resources/lexers/pico8.lua
/share/gittyup/Resources/lexers/pike.lua
/share/gittyup/Resources/lexers/pkgbuild.lua
/share/gittyup/Resources/lexers/pony.lua
/share/gittyup/Resources/lexers/powershell.lua
/share/gittyup/Resources/lexers/prolog.lua
/share/gittyup/Resources/lexers/props.lua
/share/gittyup/Resources/lexers/protobuf.lua
/share/gittyup/Resources/lexers/ps.lua
/share/gittyup/Resources/lexers/pure.lua
/share/gittyup/Resources/lexers/python.lua
/share/gittyup/Resources/lexers/rails.lua
/share/gittyup/Resources/lexers/rc.lua
/share/gittyup/Resources/lexers/reason.lua
/share/gittyup/Resources/lexers/rebol.lua
/share/gittyup/Resources/lexers/rest.lua
/share/gittyup/Resources/lexers/rexx.lua
/share/gittyup/Resources/lexers/rhtml.lua
/share/gittyup/Resources/lexers/routeros.lua
/share/gittyup/Resources/lexers/rstats.lua
/share/gittyup/Resources/lexers/ruby.lua
/share/gittyup/Resources/lexers/rust.lua
/share/gittyup/Resources/lexers/sass.lua
/share/gittyup/Resources/lexers/scala.lua
/share/gittyup/Resources/lexers/scheme.lua
/share/gittyup/Resources/lexers/smalltalk.lua
/share/gittyup/Resources/lexers/sml.lua
/share/gittyup/Resources/lexers/snobol4.lua
/share/gittyup/Resources/lexers/spin.lua
/share/gittyup/Resources/lexers/sql.lua
/share/gittyup/Resources/lexers/systemd.lua
/share/gittyup/Resources/lexers/taskpaper.lua
/share/gittyup/Resources/lexers/tcl.lua
/share/gittyup/Resources/lexers/tex.lua
/share/gittyup/Resources/lexers/texinfo.lua
/share/gittyup/Resources/lexers/text.lua
/share/gittyup/Resources/lexers/toml.lua
/share/gittyup/Resources/lexers/txt2tags.lua
/share/gittyup/Resources/lexers/vala.lua
/share/gittyup/Resources/lexers/vb.lua
/share/gittyup/Resources/lexers/vcard.lua
/share/gittyup/Resources/lexers/verilog.lua
/share/gittyup/Resources/lexers/vhdl.lua
/share/gittyup/Resources/lexers/wsf.lua
/share/gittyup/Resources/lexers/xml.lua
/share/gittyup/Resources/lexers/xs.lua
/share/gittyup/Resources/lexers/xtend.lua
/share/gittyup/Resources/lexers/yaml.lua
/share/gittyup/Resources/lexers/zig.lua
/share/gittyup/Resources/merge.lua
/share/gittyup/Resources/mergetools
/share/gittyup/Resources/plugin.html
/share/gittyup/Resources/plugins/
/share/gittyup/Resources/plugins/Banned.lua
/share/gittyup/Resources/plugins/Comments.lua
/share/gittyup/Resources/plugins/Line Length.lua
/share/gittyup/Resources/plugins/Whitespace.lua
/share/gittyup/Resources/plugins/banned.txt
/share/gittyup/Resources/privacy.html
/share/gittyup/Resources/terminal.lua
/share/gittyup/Resources/themes/
/share/gittyup/Resources/themes/Dark.lua
/share/gittyup/Resources/themes/Default.lua
/share/gittyup/Resources/themes/System.lua
/share/gittyup/Resources/update.lua
/share/gittyup/Resources/window.lua
/usr/
/usr/Gittyup
/usr/Plugins/
/usr/Plugins/imageformats/
/usr/Plugins/imageformats/libqjpeg.so
/usr/Plugins/platforminputcontexts/
/usr/Plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so
/usr/Plugins/platforms/
/usr/Plugins/platforms/libqxcb.so
/usr/Resources/
/usr/Resources/Gittyup.iconset/
/usr/Resources/Gittyup.iconset/gittyup_logo.svg
/usr/Resources/Gittyup.iconset/icon_128x128.png
/usr/Resources/Gittyup.iconset/[email protected]
/usr/Resources/Gittyup.iconset/icon_16x16.png
/usr/Resources/Gittyup.iconset/[email protected]
/usr/Resources/Gittyup.iconset/icon_256x256.png
/usr/Resources/Gittyup.iconset/[email protected]
/usr/Resources/Gittyup.iconset/icon_32x32.png
/usr/Resources/Gittyup.iconset/[email protected]
/usr/Resources/Gittyup.iconset/icon_512x512.png
/usr/Resources/Gittyup.iconset/[email protected]
/usr/Resources/Gittyup.iconset/icon_64x64.png
/usr/Resources/Gittyup.iconset/[email protected]
/usr/Resources/l10n/
/usr/Resources/l10n/qtbase_de.qm
/usr/Resources/l10n/qtbase_en.qm
/usr/Resources/l10n/qtbase_es.qm
/usr/Resources/l10n/qtbase_ja.qm
/usr/Resources/l10n/qtbase_pt_BR.qm
/usr/Resources/l10n/qtbase_ru.qm
/usr/Resources/l10n/qtbase_zh_CN.qm
/usr/git-credential-gnome-keyring
/usr/git-credential-libsecret
/usr/include/
/usr/include/git2.h
/usr/include/git2/
/usr/include/git2/annotated_commit.h
/usr/include/git2/apply.h
/usr/include/git2/attr.h
/usr/include/git2/blame.h
/usr/include/git2/blob.h
/usr/include/git2/branch.h
/usr/include/git2/buffer.h
/usr/include/git2/cert.h
/usr/include/git2/checkout.h
/usr/include/git2/cherrypick.h
/usr/include/git2/clone.h
/usr/include/git2/commit.h
/usr/include/git2/common.h
/usr/include/git2/config.h
/usr/include/git2/cred_helpers.h
/usr/include/git2/credential.h
/usr/include/git2/credential_helpers.h
/usr/include/git2/deprecated.h
/usr/include/git2/describe.h
/usr/include/git2/diff.h
/usr/include/git2/errors.h
/usr/include/git2/filter.h
/usr/include/git2/global.h
/usr/include/git2/graph.h
/usr/include/git2/ignore.h
/usr/include/git2/index.h
/usr/include/git2/indexer.h
/usr/include/git2/mailmap.h
/usr/include/git2/merge.h
/usr/include/git2/message.h
/usr/include/git2/net.h
/usr/include/git2/notes.h
/usr/include/git2/object.h
/usr/include/git2/odb.h
/usr/include/git2/odb_backend.h
/usr/include/git2/oid.h
/usr/include/git2/oidarray.h
/usr/include/git2/pack.h
/usr/include/git2/patch.h
/usr/include/git2/pathspec.h
/usr/include/git2/proxy.h
/usr/include/git2/rebase.h
/usr/include/git2/refdb.h
/usr/include/git2/reflog.h
/usr/include/git2/refs.h
/usr/include/git2/refspec.h
/usr/include/git2/remote.h
/usr/include/git2/repository.h
/usr/include/git2/reset.h
/usr/include/git2/revert.h
/usr/include/git2/revparse.h
/usr/include/git2/revwalk.h
/usr/include/git2/signature.h
/usr/include/git2/stash.h
/usr/include/git2/status.h
/usr/include/git2/stdint.h
/usr/include/git2/strarray.h
/usr/include/git2/submodule.h
/usr/include/git2/sys/
/usr/include/git2/sys/alloc.h
/usr/include/git2/sys/commit.h
/usr/include/git2/sys/config.h
/usr/include/git2/sys/cred.h
/usr/include/git2/sys/credential.h
/usr/include/git2/sys/diff.h
/usr/include/git2/sys/filter.h
/usr/include/git2/sys/hashsig.h
/usr/include/git2/sys/index.h
/usr/include/git2/sys/mempack.h
/usr/include/git2/sys/merge.h
/usr/include/git2/sys/odb_backend.h
/usr/include/git2/sys/openssl.h
/usr/include/git2/sys/path.h
/usr/include/git2/sys/refdb_backend.h
/usr/include/git2/sys/reflog.h
/usr/include/git2/sys/refs.h
/usr/include/git2/sys/repository.h
/usr/include/git2/sys/stream.h
/usr/include/git2/sys/transport.h
/usr/include/git2/tag.h
/usr/include/git2/trace.h
/usr/include/git2/transaction.h
/usr/include/git2/transport.h
/usr/include/git2/tree.h
/usr/include/git2/types.h
/usr/include/git2/version.h
/usr/include/git2/worktree.h
/usr/include/libssh2.h
/usr/include/libssh2_publickey.h
/usr/include/libssh2_sftp.h
/usr/include/zip/
/usr/include/zip/zip.h
/usr/indexer
/usr/lib/
/usr/lib/cmake/
/usr/lib/cmake/libssh2/
/usr/lib/cmake/libssh2/Libssh2Config-none.cmake
/usr/lib/cmake/libssh2/Libssh2Config.cmake
/usr/lib/cmake/libssh2/Libssh2ConfigVersion.cmake
/usr/lib/cmake/zip/
/usr/lib/cmake/zip/zipConfig.cmake
/usr/lib/cmake/zip/zipConfigVersion.cmake
/usr/lib/cmake/zip/zipTargets-none.cmake
/usr/lib/cmake/zip/zipTargets.cmake
/usr/lib/libgit2.a
/usr/lib/libssh2.a
/usr/lib/libzip.a
/usr/lib/pkgconfig/
/usr/lib/pkgconfig/libgit2.pc
/usr/lib/pkgconfig/libssh2.pc
/usr/libQt5Concurrent.so.5
/usr/libQt5Core.so.5
/usr/libQt5DBus.so.5
/usr/libQt5Gui.so.5
/usr/libQt5Network.so.5
/usr/libQt5PrintSupport.so.5
/usr/libQt5Test.so.5
/usr/libQt5Widgets.so.5
/usr/libQt5XcbQpa.so.5
/usr/relauncher
/usr/share/
/usr/share/doc/
/usr/share/doc/libssh2/
/usr/share/doc/libssh2/AUTHORS
/usr/share/doc/libssh2/COPYING
/usr/share/doc/libssh2/HACKING
/usr/share/doc/libssh2/NEWS
/usr/share/doc/libssh2/README
/usr/share/doc/libssh2/RELEASE-NOTES
/usr/share/man/
/usr/share/man/man3/
/usr/share/man/man3/libssh2_agent_connect.3.gz
/usr/share/man/man3/libssh2_agent_disconnect.3.gz
/usr/share/man/man3/libssh2_agent_free.3.gz
/usr/share/man/man3/libssh2_agent_get_identity.3.gz
/usr/share/man/man3/libssh2_agent_get_identity_path.3.gz
/usr/share/man/man3/libssh2_agent_init.3.gz
/usr/share/man/man3/libssh2_agent_list_identities.3.gz
/usr/share/man/man3/libssh2_agent_set_identity_path.3.gz
/usr/share/man/man3/libssh2_agent_userauth.3.gz
/usr/share/man/man3/libssh2_banner_set.3.gz
/usr/share/man/man3/libssh2_base64_decode.3.gz
/usr/share/man/man3/libssh2_channel_close.3.gz
/usr/share/man/man3/libssh2_channel_direct_tcpip.3.gz
/usr/share/man/man3/libssh2_channel_direct_tcpip_ex.3.gz
/usr/share/man/man3/libssh2_channel_eof.3.gz
/usr/share/man/man3/libssh2_channel_exec.3.gz
/usr/share/man/man3/libssh2_channel_flush.3.gz
/usr/share/man/man3/libssh2_channel_flush_ex.3.gz
/usr/share/man/man3/libssh2_channel_flush_stderr.3.gz
/usr/share/man/man3/libssh2_channel_forward_accept.3.gz
/usr/share/man/man3/libssh2_channel_forward_cancel.3.gz
/usr/share/man/man3/libssh2_channel_forward_listen.3.gz
/usr/share/man/man3/libssh2_channel_forward_listen_ex.3.gz
/usr/share/man/man3/libssh2_channel_free.3.gz
/usr/share/man/man3/libssh2_channel_get_exit_signal.3.gz
/usr/share/man/man3/libssh2_channel_get_exit_status.3.gz
/usr/share/man/man3/libssh2_channel_handle_extended_data.3.gz
/usr/share/man/man3/libssh2_channel_handle_extended_data2.3.gz
/usr/share/man/man3/libssh2_channel_ignore_extended_data.3.gz
/usr/share/man/man3/libssh2_channel_open_ex.3.gz
/usr/share/man/man3/libssh2_channel_open_session.3.gz
/usr/share/man/man3/libssh2_channel_process_startup.3.gz
/usr/share/man/man3/libssh2_channel_read.3.gz
/usr/share/man/man3/libssh2_channel_read_ex.3.gz
/usr/share/man/man3/libssh2_channel_read_stderr.3.gz
/usr/share/man/man3/libssh2_channel_receive_window_adjust.3.gz
/usr/share/man/man3/libssh2_channel_receive_window_adjust2.3.gz
/usr/share/man/man3/libssh2_channel_request_pty.3.gz
/usr/share/man/man3/libssh2_channel_request_pty_ex.3.gz
/usr/share/man/man3/libssh2_channel_request_pty_size.3.gz
/usr/share/man/man3/libssh2_channel_request_pty_size_ex.3.gz
/usr/share/man/man3/libssh2_channel_send_eof.3.gz
/usr/share/man/man3/libssh2_channel_set_blocking.3.gz
/usr/share/man/man3/libssh2_channel_setenv.3.gz
/usr/share/man/man3/libssh2_channel_setenv_ex.3.gz
/usr/share/man/man3/libssh2_channel_shell.3.gz
/usr/share/man/man3/libssh2_channel_subsystem.3.gz
/usr/share/man/man3/libssh2_channel_wait_closed.3.gz
/usr/share/man/man3/libssh2_channel_wait_eof.3.gz
/usr/share/man/man3/libssh2_channel_window_read.3.gz
/usr/share/man/man3/libssh2_channel_window_read_ex.3.gz
/usr/share/man/man3/libssh2_channel_window_write.3.gz
/usr/share/man/man3/libssh2_channel_window_write_ex.3.gz
/usr/share/man/man3/libssh2_channel_write.3.gz
/usr/share/man/man3/libssh2_channel_write_ex.3.gz
/usr/share/man/man3/libssh2_channel_write_stderr.3.gz
/usr/share/man/man3/libssh2_channel_x11_req.3.gz
/usr/share/man/man3/libssh2_channel_x11_req_ex.3.gz
/usr/share/man/man3/libssh2_exit.3.gz
/usr/share/man/man3/libssh2_free.3.gz
/usr/share/man/man3/libssh2_hostkey_hash.3.gz
/usr/share/man/man3/libssh2_init.3.gz
/usr/share/man/man3/libssh2_keepalive_config.3.gz
/usr/share/man/man3/libssh2_keepalive_send.3.gz
/usr/share/man/man3/libssh2_knownhost_add.3.gz
/usr/share/man/man3/libssh2_knownhost_addc.3.gz
/usr/share/man/man3/libssh2_knownhost_check.3.gz
/usr/share/man/man3/libssh2_knownhost_checkp.3.gz
/usr/share/man/man3/libssh2_knownhost_del.3.gz
/usr/share/man/man3/libssh2_knownhost_free.3.gz
/usr/share/man/man3/libssh2_knownhost_get.3.gz
/usr/share/man/man3/libssh2_knownhost_init.3.gz
/usr/share/man/man3/libssh2_knownhost_readfile.3.gz
/usr/share/man/man3/libssh2_knownhost_readline.3.gz
/usr/share/man/man3/libssh2_knownhost_writefile.3.gz
/usr/share/man/man3/libssh2_knownhost_writeline.3.gz
/usr/share/man/man3/libssh2_poll.3.gz
/usr/share/man/man3/libssh2_poll_channel_read.3.gz
/usr/share/man/man3/libssh2_publickey_add.3.gz
/usr/share/man/man3/libssh2_publickey_add_ex.3.gz
/usr/share/man/man3/libssh2_publickey_init.3.gz
/usr/share/man/man3/libssh2_publickey_list_fetch.3.gz
/usr/share/man/man3/libssh2_publickey_list_free.3.gz
/usr/share/man/man3/libssh2_publickey_remove.3.gz
/usr/share/man/man3/libssh2_publickey_remove_ex.3.gz
/usr/share/man/man3/libssh2_publickey_shutdown.3.gz
/usr/share/man/man3/libssh2_scp_recv.3.gz
/usr/share/man/man3/libssh2_scp_recv2.3.gz
/usr/share/man/man3/libssh2_scp_send.3.gz
/usr/share/man/man3/libssh2_scp_send64.3.gz
/usr/share/man/man3/libssh2_scp_send_ex.3.gz
/usr/share/man/man3/libssh2_session_abstract.3.gz
/usr/share/man/man3/libssh2_session_banner_get.3.gz
/usr/share/man/man3/libssh2_session_banner_set.3.gz
/usr/share/man/man3/libssh2_session_block_directions.3.gz
/usr/share/man/man3/libssh2_session_callback_set.3.gz
/usr/share/man/man3/libssh2_session_disconnect.3.gz
/usr/share/man/man3/libssh2_session_disconnect_ex.3.gz
/usr/share/man/man3/libssh2_session_flag.3.gz
/usr/share/man/man3/libssh2_session_free.3.gz
/usr/share/man/man3/libssh2_session_get_blocking.3.gz
/usr/share/man/man3/libssh2_session_get_timeout.3.gz
/usr/share/man/man3/libssh2_session_handshake.3.gz
/usr/share/man/man3/libssh2_session_hostkey.3.gz
/usr/share/man/man3/libssh2_session_init.3.gz
/usr/share/man/man3/libssh2_session_init_ex.3.gz
/usr/share/man/man3/libssh2_session_last_errno.3.gz
/usr/share/man/man3/libssh2_session_last_error.3.gz
/usr/share/man/man3/libssh2_session_method_pref.3.gz
/usr/share/man/man3/libssh2_session_methods.3.gz
/usr/share/man/man3/libssh2_session_set_blocking.3.gz
/usr/share/man/man3/libssh2_session_set_last_error.3.gz
/usr/share/man/man3/libssh2_session_set_timeout.3.gz
/usr/share/man/man3/libssh2_session_startup.3.gz
/usr/share/man/man3/libssh2_session_supported_algs.3.gz
/usr/share/man/man3/libssh2_sftp_close.3.gz
/usr/share/man/man3/libssh2_sftp_close_handle.3.gz
/usr/share/man/man3/libssh2_sftp_closedir.3.gz
/usr/share/man/man3/libssh2_sftp_fsetstat.3.gz
/usr/share/man/man3/libssh2_sftp_fstat.3.gz
/usr/share/man/man3/libssh2_sftp_fstat_ex.3.gz
/usr/share/man/man3/libssh2_sftp_fstatvfs.3.gz
/usr/share/man/man3/libssh2_sftp_fsync.3.gz
/usr/share/man/man3/libssh2_sftp_get_channel.3.gz
/usr/share/man/man3/libssh2_sftp_init.3.gz
/usr/share/man/man3/libssh2_sftp_last_error.3.gz
/usr/share/man/man3/libssh2_sftp_lstat.3.gz
/usr/share/man/man3/libssh2_sftp_mkdir.3.gz
/usr/share/man/man3/libssh2_sftp_mkdir_ex.3.gz
/usr/share/man/man3/libssh2_sftp_open.3.gz
/usr/share/man/man3/libssh2_sftp_open_ex.3.gz
/usr/share/man/man3/libssh2_sftp_opendir.3.gz
/usr/share/man/man3/libssh2_sftp_read.3.gz
/usr/share/man/man3/libssh2_sftp_readdir.3.gz
/usr/share/man/man3/libssh2_sftp_readdir_ex.3.gz
/usr/share/man/man3/libssh2_sftp_readlink.3.gz
/usr/share/man/man3/libssh2_sftp_realpath.3.gz
/usr/share/man/man3/libssh2_sftp_rename.3.gz
/usr/share/man/man3/libssh2_sftp_rename_ex.3.gz
/usr/share/man/man3/libssh2_sftp_rewind.3.gz
/usr/share/man/man3/libssh2_sftp_rmdir.3.gz
/usr/share/man/man3/libssh2_sftp_rmdir_ex.3.gz
/usr/share/man/man3/libssh2_sftp_seek.3.gz
/usr/share/man/man3/libssh2_sftp_seek64.3.gz
/usr/share/man/man3/libssh2_sftp_setstat.3.gz
/usr/share/man/man3/libssh2_sftp_shutdown.3.gz
/usr/share/man/man3/libssh2_sftp_stat.3.gz
/usr/share/man/man3/libssh2_sftp_stat_ex.3.gz
/usr/share/man/man3/libssh2_sftp_statvfs.3.gz
/usr/share/man/man3/libssh2_sftp_symlink.3.gz
/usr/share/man/man3/libssh2_sftp_symlink_ex.3.gz
/usr/share/man/man3/libssh2_sftp_tell.3.gz
/usr/share/man/man3/libssh2_sftp_tell64.3.gz
/usr/share/man/man3/libssh2_sftp_unlink.3.gz
/usr/share/man/man3/libssh2_sftp_unlink_ex.3.gz
/usr/share/man/man3/libssh2_sftp_write.3.gz
/usr/share/man/man3/libssh2_trace.3.gz
/usr/share/man/man3/libssh2_trace_sethandler.3.gz
/usr/share/man/man3/libssh2_userauth_authenticated.3.gz
/usr/share/man/man3/libssh2_userauth_hostbased_fromfile.3.gz
/usr/share/man/man3/libssh2_userauth_hostbased_fromfile_ex.3.gz
/usr/share/man/man3/libssh2_userauth_keyboard_interactive.3.gz
/usr/share/man/man3/libssh2_userauth_keyboard_interactive_ex.3.gz
/usr/share/man/man3/libssh2_userauth_list.3.gz
/usr/share/man/man3/libssh2_userauth_password.3.gz
/usr/share/man/man3/libssh2_userauth_password_ex.3.gz
/usr/share/man/man3/libssh2_userauth_publickey.3.gz
/usr/share/man/man3/libssh2_userauth_publickey_fromfile.3.gz
/usr/share/man/man3/libssh2_userauth_publickey_fromfile_ex.3.gz
/usr/share/man/man3/libssh2_userauth_publickey_frommemory.3.gz
/usr/share/man/man3/libssh2_version.3.gz

Note that besides the problem with the base paths, there is also a lot of cruft in here that should NOT be installed at all. Notably stuff that will conflict with other system packages like everything in /usr/share/man that will exist already for any system with libssh2 installed. Likewise everything in /usr/include looks like duplicates of system stuff that Gittyup is vendoring but should NOT be installing.

@Murmele
Copy link
Owner Author

Murmele commented Jun 10, 2022

rces, neither of which are correct.

With those build options here is the full file list ninja install tries to place:

Can you remove the slash in front of share? I think it will otherwise be interpreted as absolute path.
I pushed an update maybe it fixes also your problem

@alerque
Copy link
Contributor

alerque commented Jun 10, 2022

Either the change you made or removing the leading slash did change where most of the resources went and they are in /usr/share/gittyup/Resources. However the entire rest of the build is garbage, the bin is installed directly in /usr along with almost everything else (e.g. /usr/Plugins/*, /usr/relauncher, etc. You seem to be using the prefix wrong in all the other places now and need a BINDIR, LIBDIR and maybe others to match the now working DATADIR setting.

@Murmele
Copy link
Owner Author

Murmele commented Jun 10, 2022

what is the path of "$pkgdir"?
Where do I find the current pkgbuild file?

@alerque
Copy link
Contributor

alerque commented Jun 10, 2022

what is the path of "$pkgdir"?

The $pkgdir is a temporary target location that starts out blank at the beginning every build and should be populated by the "install" phase (package() function in the PKGBUILD file). Everything in that directory at the end is then bundled up in the package. When the package is installed everything in it is placed at the system root.

This is quite typical of distro packaging and the typical usage of things like DESTDIR vars for make/ninja/etc.

Where do I find the current pkgbuild file?

Here is one I am using for testing:

pkgname=gittyup-git
_pkgname=${pkgname%-git}
pkgver=1.1.1.r2.g689437c
pkgrel=1
pkgdesc='Graphical Git client (GitAhead fork)'
url="https://github.com/Murmele/${_pkgname^}"
arch=(x86_64)
license=(MIT)
depends=(cmark
         libssh2
         libsecret
         lua
         qt5-base)
makedepends=(cmake
             git
             hunspell
             libgit2
             libgnome-keyring
             ninja
             openssl
             qt5-tools
             qt5-translations)
optdepends=('git-lfs: git-lfs support'
            'libgnome-keyring: for GNOME Keyring for auth credentials'
            'qt5-translations: translations')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("$_pkgname::git+$url.git#branch=ArchBuild"
        "$_pkgname-cmark::git+https://github.com/commonmark/cmark.git"
        "$_pkgname-git::git+https://github.com/git/git.git"
        "$_pkgname-hunspell::git+https://github.com/hunspell/hunspell.git"
        "$_pkgname-libgit2::git+https://github.com/stinb/libgit2.git" # a fork, not the official upstream!
        "$_pkgname-libssh2::git+https://github.com/libssh2/libssh2.git"
        "$_pkgname-openssl::git+https://github.com/openssl/openssl.git"
        "$_pkgname-zip::git+https://github.com/kuba--/zip.git"
        "$_pkgname.desktop")
sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'fb900e4d101c19a5b3e1dc4c7619780e1d38fd78d0b9d951e794fbf36eebf21a')

pkgver() {
	cd "$_pkgname"
	git describe --long --tags --exclude latest |
		sed 's/^gittyup_v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	cd "$_pkgname"
	git config advice.detachedHead false
	git submodule init
	git config submodule.test/dep/zip.url "$srcdir/$_pkgname-zip"
	git config submodule.dep/libgit2/libgit2.url "$srcdir/$_pkgname-libgit2"
	git config submodule.dep/git/git.url "$srcdir/$_pkgname-git"
	git config submodule.dep/libssh2/libssh2.url "$srcdir/$_pkgname-libssh2"
	git config submodule.dep/hunspell/hunspell.url "$srcdir/$_pkgname-hunspell"
	git config submodule.dep/openssl/openssl.url "$srcdir/$_pkgname-openssl"
	git config submodule.dep/cmark/cmark.url "$srcdir/$_pkgname-cmark"
	git submodule update
	sed -i -e 's/cmark_exe/cmark/' src/app/CMakeLists.txt
}

build() {
	cmake \
		-G Ninja \
		-W no-dev \
		-D CMAKE_BUILD_TYPE=None \
		-D CMAKE_INSTALL_PREFIX=/usr \
		-D DATA_INSTALL_PREFIX=share/$_pkgname \
		-D ENABLE_REPRODUCIBLE_BUILDS=ON \
		-D BUILD_SHARED_LIBS=OFF \
		-D BUILD_TESTS=OFF \
		-B build \
		-S "$_pkgname"
	ninja -C build
}

package() {
	cd "$_pkgname"
	DESTDIR="$pkgdir" ninja -C ../build install
	# rm -rf "$pkgdir/usr/lib/gittyup/"*.so.*
	# local _bin="$pkgdir/usr/lib/$_pkgname/${_pkgname^}"
	# install -Dm0755 "$_bin" "$pkgdir/usr/bin/$_pkgname"
	# rm "$_bin"
	# mv "$pkgdir/usr/"{lib/$_pkgname/Resources,share/$_pkgname}
	# rm -rf "$pkgdir/usr/lib/$_pkgname/"{include,lib/cmake}
	# install -Dm0644 -t "$pkgdir/usr/share/licenses/$_pkgname/" LICENSE.md
	# install -Dm0644 -t "$pkgdir/usr/share/applications/" ../$_pkgname.desktop
	# install -Dm0644 rsrc/Gittyup.iconset/gittyup_logo.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/gittyup.svg"
	# for s in 16x16 32x32 64x64 128x128 256x256 512x512; do
	#     install -Dm0644 "rsrc/Gittyup.iconset/icon_$s.png" "$pkgdir/usr/share/icons/hicolor/$s/apps/$_pkgname.png"
	# done
	# rm -rf "$pkgdir/usr/share/man" # libssh2 man pages
}

It should be compiled using makechrootpkg ... (or the easier to setup extra-x86_64-build from the devtools package) for best effect. Once a package is built you can inspect the list of files it would install with pacman -Qlip <packagefile>.

@alerque
Copy link
Contributor

alerque commented Jun 10, 2022

That PKGBUILD will be a little hard to test build without the expected desktop file and other resources next to it. Here is a fork of the AUR package I'm working with to test this: https://github.com/alerque/gittyup-git

@Murmele
Copy link
Owner Author

Murmele commented Jun 10, 2022

But you can rename the desktop file from the repository or?

@alerque
Copy link
Contributor

alerque commented Jun 10, 2022

Don't worry about the desktop file, I'll look into using the one from the repo. I don't think it existed when this was written up. I'll massage the details later, just the build & install steps need to do roughly the right thing. Right now with everything going to bare /usr it is basically unusable, the prefix is simply not being used right for anything except the data dir fixed here. Using it properly to get the right data dir puts everything else in the wrong place, only abusing the prefix to set the entire install gets close.

@exactly-one-kas exactly-one-kas added the enhancement New feature or request label Jun 19, 2022
@alerque alerque mentioned this pull request Jul 20, 2022
@alerque alerque mentioned this pull request Aug 31, 2022
@exactly-one-kas exactly-one-kas mentioned this pull request Oct 16, 2022
1 task
@exactly-one-kas
Copy link
Collaborator

Another thing to be on the lookout for: in the current master, the l10n folder with Gittyup's translations isn't copied into Resources/, making translations not work with neither AUR nor a local dev build

@Murmele
Copy link
Owner Author

Murmele commented Dec 12, 2022

This one was taken over by @exactly-one-kas with #314 which was merged. The translation topic shall be done in another one. All of this changes are already in the current master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash after theme selection
3 participants