{"action":"created","issue":{"url":"https://api.github.com/repos/doug-moen/curv/issues/41","repository_url":"https://api.github.com/repos/doug-moen/curv","labels_url":"https://api.github.com/repos/doug-moen/curv/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/doug-moen/curv/issues/41/comments","events_url":"https://api.github.com/repos/doug-moen/curv/issues/41/events","html_url":"https://github.com/doug-moen/curv/issues/41","id":366174625,"node_id":"MDU6SXNzdWUzNjYxNzQ2MjU=","number":41,"title":"Improve Build Process for Maintainers","user":{"login":"s-ol","id":1731279,"node_id":"MDQ6VXNlcjE3MzEyNzk=","avatar_url":"https://avatars1.githubusercontent.com/u/1731279?v=4","gravatar_id":"","url":"https://api.github.com/users/s-ol","html_url":"https://github.com/s-ol","followers_url":"https://api.github.com/users/s-ol/followers","following_url":"https://api.github.com/users/s-ol/following{/other_user}","gists_url":"https://api.github.com/users/s-ol/gists{/gist_id}","starred_url":"https://api.github.com/users/s-ol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-ol/subscriptions","organizations_url":"https://api.github.com/users/s-ol/orgs","repos_url":"https://api.github.com/users/s-ol/repos","events_url":"https://api.github.com/users/s-ol/events{/privacy}","received_events_url":"https://api.github.com/users/s-ol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-03T04:51:24Z","updated_at":"2018-10-05T02:13:22Z","closed_at":null,"author_association":"NONE","body":"Hey, I just created an [AUR package](https://aur.archlinux.org/packages/curv-git/) for curv.\r\n\r\nThere are two problems with the current build process I had to work around:\r\n\r\n### The Makefile doesn't expose the CMAKE flags\r\nTo create a binary package the installation root directory has to be set to a folder that can be bundled to form the package later. This requires setting `-DCMAKE_INSTALL_PREFIX`, which can only be set as a command line flag and is not exposed from your `Makefile`.\r\n\r\nThere is the `DESTDIR` env variable of `make install` that I can set, but cmake per default still modifies the path to point to `$DESTDIR/usr/local`, while Arch for example doesn't allow installing binaries to `/usr/local/bin` (they should go to `/usr/bin`) - so `DESTDIR` is not enough.\r\n\r\nThis also brings up the question - what is the benefit of the master Makefile? From a maintenance POV it seems preferrable to stick with the standard cmake build workflow.\r\n\r\n### The CMakeLists.txt doesn't honor `CMAKE_INSTALL_PREFIX`\r\nIn your CMakeLists.txt [you `install()` your language specs to hardcoded paths](https://github.com/doug-moen/curv/blob/master/CMakeLists.txt#L81-L86). These paths should be correctly generated using `CMAKE_INSTALL_PREFIX` and ideally `DESTDIR`. In the current version this breaks my build by trying to install to a location outside of the build sandbox.\r\n\r\n\r\nFor now I fixed both issues by ignoring your master-Makefile and just unrolling the cmake setup myself, as well as including a patch that removes the lines I linked above and just omits the language specs.\r\n```bash\r\nprepare() {\r\n  cd \"$_pkgname\"\r\n  git submodule update --init\r\n  patch -Np1 -i \"${srcdir}/remove_lang_file.patch\"\r\n\r\n  echo '#define CURV_VERSION \"'`git describe --tags --always --dirty`'\"' >,v\r\n  if cmp -s ,v libcurv/version.h; then rm ,v; else mv ,v libcurv/version.h; fi\r\n\r\n  mkdir -p release\r\n  cd release\r\n  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=\"${pkgdir}\"/usr ..\r\n}\r\n\r\nbuild() {\r\n  cd \"$_pkgname\"/release\r\n  make\r\n}\r\n\r\npackage() {\r\n  cd \"$_pkgname\"/release\r\n  make install\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/doug-moen/curv/issues/comments/427225420","html_url":"https://github.com/doug-moen/curv/issues/41#issuecomment-427225420","issue_url":"https://api.github.com/repos/doug-moen/curv/issues/41","id":427225420,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzIyNTQyMA==","user":{"login":"doug-moen","id":5274273,"node_id":"MDQ6VXNlcjUyNzQyNzM=","avatar_url":"https://avatars2.githubusercontent.com/u/5274273?v=4","gravatar_id":"","url":"https://api.github.com/users/doug-moen","html_url":"https://github.com/doug-moen","followers_url":"https://api.github.com/users/doug-moen/followers","following_url":"https://api.github.com/users/doug-moen/following{/other_user}","gists_url":"https://api.github.com/users/doug-moen/gists{/gist_id}","starred_url":"https://api.github.com/users/doug-moen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doug-moen/subscriptions","organizations_url":"https://api.github.com/users/doug-moen/orgs","repos_url":"https://api.github.com/users/doug-moen/repos","events_url":"https://api.github.com/users/doug-moen/events{/privacy}","received_events_url":"https://api.github.com/users/doug-moen/received_events","type":"User","site_admin":false},"created_at":"2018-10-05T02:13:22Z","updated_at":"2018-10-05T02:13:22Z","author_association":"OWNER","body":"Thanks @mkeeter!"}}
{"actor":{"display_login":"doug-moen"}}