{"action":"created","issue":{"url":"https://api.github.com/repos/miloyip/rapidjson/issues/307","labels_url":"https://api.github.com/repos/miloyip/rapidjson/issues/307/labels{/name}","comments_url":"https://api.github.com/repos/miloyip/rapidjson/issues/307/comments","events_url":"https://api.github.com/repos/miloyip/rapidjson/issues/307/events","html_url":"https://github.com/miloyip/rapidjson/pull/307","id":69128751,"number":307,"title":"Deb packaging with CPack","user":{"login":"vitalyisaev2","id":5507054,"avatar_url":"https://avatars.githubusercontent.com/u/5507054?v=3","gravatar_id":"","url":"https://api.github.com/users/vitalyisaev2","html_url":"https://github.com/vitalyisaev2","followers_url":"https://api.github.com/users/vitalyisaev2/followers","following_url":"https://api.github.com/users/vitalyisaev2/following{/other_user}","gists_url":"https://api.github.com/users/vitalyisaev2/gists{/gist_id}","starred_url":"https://api.github.com/users/vitalyisaev2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitalyisaev2/subscriptions","organizations_url":"https://api.github.com/users/vitalyisaev2/orgs","repos_url":"https://api.github.com/users/vitalyisaev2/repos","events_url":"https://api.github.com/users/vitalyisaev2/events{/privacy}","received_events_url":"https://api.github.com/users/vitalyisaev2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-17T12:22:43Z","updated_at":"2015-04-17T15:12:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/miloyip/rapidjson/pulls/307","html_url":"https://github.com/miloyip/rapidjson/pull/307","diff_url":"https://github.com/miloyip/rapidjson/pull/307.diff","patch_url":"https://github.com/miloyip/rapidjson/pull/307.patch"},"body":"Hello! First we would like to thank you for a nice library. Some of our Ubuntu-based solutions rely on Rapidjson, so we would like to make the use of it a bit more standardized. At the moment our projects acquire Rapidjson as a git submodule, but it's not very convenient due to the absence of of version control which is prefferable for our build system. That's why we would like to have packages.\r\n\r\nThis patch provides the opportunity for building binary deb packages with **CPack** tool (full-featured debianization seem to be overkill for this case). Everything is based on your actual ```CMakeLists.txt```.  So far we got two packages (according to the ```components``` specified in ```CMakeLists.txt```):\r\n\r\n1. rapidjson-dev\r\n2. rapidjson-examples \r\n\r\n```bash\r\nroot@9497495eef1e:~/rapidjson# cmake .\r\nroot@9497495eef1e:~/rapidjson# cpack\r\nCPack: Create package using TGZ\r\nCPack: Install projects\r\nCPack: - Run preinstall target for: RapidJSON\r\nCPack: - Install project: RapidJSON\r\nCPack: Create package\r\nCPack: - package: /root/rapidjson/rapidjson_0.12.0~git20151704-1_all.tar.gz generated.\r\nCPack: Create package using DEB\r\nCPack: Install projects\r\nCPack: - Run preinstall target for: RapidJSON\r\nCPack: - Install project: RapidJSON\r\nCPack: -   Install component: dev\r\nCPack: -   Install component: examples\r\nCPack: Create package\r\nCPack: - package: /root/rapidjson/rapidjson_0.12.0~git20151704-1_all-dev.deb generated.\r\nCPack: - package: /root/rapidjson/rapidjson_0.12.0~git20151704-1_all-examples.deb generated.\r\n```\r\n\r\nYou may check the content of packages:\r\n```bash\r\nroot@9497495eef1e:~/rapidjson# dpkg -c rapidjson_0.12.0~git20151704-1_all-dev.deb\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/include/\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/include/rapidjson/\r\n-rw-r--r-- root/root      2563 2015-04-17 11:55 ./usr/local/include/rapidjson/memorybuffer.h\r\n-rw-r--r-- root/root      2882 2015-04-17 11:55 ./usr/local/include/rapidjson/filewritestream.h\r\n-rw-r--r-- root/root     59281 2015-04-17 11:55 ./usr/local/include/rapidjson/reader.h\r\n-rw-r--r-- root/root     14133 2015-04-17 11:55 ./usr/local/include/rapidjson/writer.h\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/include/rapidjson/error/\r\n-rw-r--r-- root/root      3677 2015-04-17 11:55 ./usr/local/include/rapidjson/error/en.h\r\n-rw-r--r-- root/root      5677 2015-04-17 11:55 ./usr/local/include/rapidjson/error/error.h\r\n-rw-r--r-- root/root      3167 2015-04-17 11:55 ./usr/local/include/rapidjson/stringbuffer.h\r\n-rw-r--r-- root/root      9903 2015-04-17 11:55 ./usr/local/include/rapidjson/encodedstream.h\r\n-rw-r--r-- root/root      2471 2015-04-17 11:55 ./usr/local/include/rapidjson/memorystream.h\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/include/rapidjson/msinttypes/\r\n-rw-r--r-- root/root      8372 2015-04-17 11:55 ./usr/local/include/rapidjson/msinttypes/inttypes.h\r\n-rw-r--r-- root/root      9327 2015-04-17 11:55 ./usr/local/include/rapidjson/msinttypes/stdint.h\r\n-rw-r--r-- root/root      9993 2015-04-17 11:55 ./usr/local/include/rapidjson/allocators.h\r\n-rw-r--r-- root/root     23547 2015-04-17 11:55 ./usr/local/include/rapidjson/encodings.h\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/include/rapidjson/internal/\r\n-rw-r--r-- root/root      3621 2015-04-17 11:55 ./usr/local/include/rapidjson/internal/pow10.h\r\n-rw-r--r-- root/root      8134 2015-04-17 11:55 ./usr/local/include/rapidjson/internal/strtod.h\r\n-rw-r--r-- root/root     10306 2015-04-17 11:55 ./usr/local/include/rapidjson/internal/itoa.h\r\n-rw-r--r-- root/root      6781 2015-04-17 11:55 ./usr/local/include/rapidjson/internal/dtoa.h\r\n-rw-r--r-- root/root     11227 2015-04-17 11:55 ./usr/local/include/rapidjson/internal/diyfp.h\r\n-rw-r--r-- root/root      1419 2015-04-17 11:55 ./usr/local/include/rapidjson/internal/strfunc.h\r\n-rw-r--r-- root/root      6841 2015-04-17 11:55 ./usr/local/include/rapidjson/internal/meta.h\r\n-rw-r--r-- root/root      8833 2015-04-17 11:55 ./usr/local/include/rapidjson/internal/biginteger.h\r\n-rw-r--r-- root/root      5766 2015-04-17 11:55 ./usr/local/include/rapidjson/internal/stack.h\r\n-rw-r--r-- root/root      2886 2015-04-17 11:55 ./usr/local/include/rapidjson/internal/ieee754.h\r\n-rw-r--r-- root/root     21431 2015-04-17 11:55 ./usr/local/include/rapidjson/rapidjson.h\r\n-rw-r--r-- root/root      7926 2015-04-17 11:55 ./usr/local/include/rapidjson/prettywriter.h\r\n-rw-r--r-- root/root      2889 2015-04-17 11:55 ./usr/local/include/rapidjson/filereadstream.h\r\n-rw-r--r-- root/root     85502 2015-04-17 11:55 ./usr/local/include/rapidjson/document.h\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/lib/\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/lib/cmake/\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/lib/cmake/RapidJSON/\r\n-rw-r--r-- root/root       455 2015-04-17 12:00 ./usr/local/lib/cmake/RapidJSON/RapidJSONConfigVersion.cmake\r\n-rw-r--r-- root/root       197 2015-04-17 12:00 ./usr/local/lib/cmake/RapidJSON/RapidJSONConfig.cmake\r\nroot@9497495eef1e:~/rapidjson# dpkg -c rapidjson_0.12.0~git20151704-1_all-examples.deb\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/share/\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/share/doc/\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/share/doc/RapidJSON/\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/share/doc/RapidJSON/examples/\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/share/doc/RapidJSON/examples/capitalize/\r\n-rw-r--r-- root/root      2436 2015-04-17 11:55 ./usr/local/share/doc/RapidJSON/examples/capitalize/capitalize.cpp\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/share/doc/RapidJSON/examples/prettyauto/\r\n-rw-r--r-- root/root      2288 2015-04-17 11:55 ./usr/local/share/doc/RapidJSON/examples/prettyauto/prettyauto.cpp\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/share/doc/RapidJSON/examples/messagereader/\r\n-rw-r--r-- root/root      2686 2015-04-17 11:55 ./usr/local/share/doc/RapidJSON/examples/messagereader/messagereader.cpp\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/share/doc/RapidJSON/examples/pretty/\r\n-rw-r--r-- root/root      1036 2015-04-17 11:55 ./usr/local/share/doc/RapidJSON/examples/pretty/pretty.cpp\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/share/doc/RapidJSON/examples/simplereader/\r\n-rw-r--r-- root/root      1678 2015-04-17 11:55 ./usr/local/share/doc/RapidJSON/examples/simplereader/simplereader.cpp\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/share/doc/RapidJSON/examples/simpledom/\r\n-rw-r--r-- root/root       685 2015-04-17 11:55 ./usr/local/share/doc/RapidJSON/examples/simpledom/simpledom.cpp\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/share/doc/RapidJSON/examples/tutorial/\r\n-rw-r--r-- root/root      6407 2015-04-17 11:55 ./usr/local/share/doc/RapidJSON/examples/tutorial/tutorial.cpp\r\n-rw-r--r-- root/root       875 2015-04-17 11:55 ./usr/local/share/doc/RapidJSON/examples/CMakeLists.txt\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/share/doc/RapidJSON/examples/condense/\r\n-rw-r--r-- root/root      1034 2015-04-17 11:55 ./usr/local/share/doc/RapidJSON/examples/condense/condense.cpp\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/share/doc/RapidJSON/examples/simplewriter/\r\n-rw-r--r-- root/root       738 2015-04-17 11:55 ./usr/local/share/doc/RapidJSON/examples/simplewriter/simplewriter.cpp\r\ndrwxr-xr-x root/root         0 2015-04-17 12:15 ./usr/local/share/doc/RapidJSON/examples/serialize/\r\n-rw-r--r-- root/root      4161 2015-04-17 11:55 ./usr/local/share/doc/RapidJSON/examples/serialize/serialize.cpp\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/miloyip/rapidjson/issues/comments/94005944","html_url":"https://github.com/miloyip/rapidjson/pull/307#issuecomment-94005944","issue_url":"https://api.github.com/repos/miloyip/rapidjson/issues/307","id":94005944,"user":{"login":"vitalyisaev2","id":5507054,"avatar_url":"https://avatars.githubusercontent.com/u/5507054?v=3","gravatar_id":"","url":"https://api.github.com/users/vitalyisaev2","html_url":"https://github.com/vitalyisaev2","followers_url":"https://api.github.com/users/vitalyisaev2/followers","following_url":"https://api.github.com/users/vitalyisaev2/following{/other_user}","gists_url":"https://api.github.com/users/vitalyisaev2/gists{/gist_id}","starred_url":"https://api.github.com/users/vitalyisaev2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitalyisaev2/subscriptions","organizations_url":"https://api.github.com/users/vitalyisaev2/orgs","repos_url":"https://api.github.com/users/vitalyisaev2/repos","events_url":"https://api.github.com/users/vitalyisaev2/events{/privacy}","received_events_url":"https://api.github.com/users/vitalyisaev2/received_events","type":"User","site_admin":false},"created_at":"2015-04-17T15:12:53Z","updated_at":"2015-04-17T15:12:53Z","body":"There are several opportunities for project debianization:\r\n1. Full-featured, \"canonical\" debianization (with ```./debian```, changelog file, etc.)\r\n2. Simplified debianization with binary package generators like **CMake/CPack** (no changelog needed). \r\n\r\n@miloyip You should choose the first option in case if you (as a project owner) or someone else are ready to maintain the package. This is a nice and canonical way of working with debian packages. I would be happy if this project has found its maintainer. But if you are not ready to spend extra time, you can allow your users (like me) just to build binary packages from upstream.\r\n\r\n@shindo I approve the version notation that you suggested. But since the version hasn't been changed for a long time, I decided to add date string to the package name. With this patch you'll get the packages with a following names:\r\n- rapidjson_0.12.0~git20151704-1_all-dev.deb\r\n- rapidjson_0.12.0~git20151704-1_all-doc.deb\r\n- rapidjson_0.12.0~git20151704-1_all-examples.deb\r\n\r\nActually someone from Debian attempted to do the same thing half a year ago: \r\nhttps://launchpad.net/ubuntu/vivid/+package/rapidjson-dev\r\n"}}