diff options
Diffstat (limited to 'www-apps/liquid_feedback_core')
4 files changed, 104 insertions, 11 deletions
diff --git a/www-apps/liquid_feedback_core/Manifest b/www-apps/liquid_feedback_core/Manifest index 400ac5acd5b2..04d79b1b2830 100644 --- a/www-apps/liquid_feedback_core/Manifest +++ b/www-apps/liquid_feedback_core/Manifest @@ -1,8 +1,11 @@ AUX liquid_feedback_core-2.2.3-gentoo.patch 609 BLAKE2B 2e142166f14f755720ed27213c4bbe8c30070dc36f6640c32ce9505614eb438140f7c7ea9c9fc0089ba62a100f5ef634adce107e2218dcb2d14b5584c52aceec SHA512 59058bd2ec5c60c13864b0d928b536ef3222be23eba49427b1c7c76c6e84a0130d802102eb3c14a48c5d60d1b93e8859feec339368e479bae1c08acbaeb2f63d AUX liquid_feedback_core-3.0.4-gentoo.patch 843 BLAKE2B 81b37cf79c20a83db0d5c55df82db93674177b9821781c60605113877ac7c2a5659f38c4466731ccdf3dbce8507ecf2bc2ea758b21dbd08f91b38af7bd1b4aec SHA512 7eb4f00c375f102910d755c3a2896fa4d3f1213c430e6cb1154a7d135f8445580245f93055a1d6f84fa1826f74c226d3bac9ebfd37d5be4c45ec9fd34e05b859 -AUX postinstall-en.txt 1498 BLAKE2B 0b29f386ea2c6a132046a42ebb246ecb428821d76a027722b4260f7c7bd00e99186ce145a2b5d7f169eb25b28a702ef4d3c2e0a0ae3217321f6969a2efc02304 SHA512 cd1488337b3faae08a1d7c326b4c1445863fb07b3d39b63460703467ad85524acf0fc14a19278a9cf995304e3a79c1b90ecdc0098f984d106d484f79d315b8e2 +AUX liquid_feedback_core-3.2.2-gentoo.patch 1636 BLAKE2B 19f82ae7917a8e0a99fbd390ca613872dfd8351b27e4f6500ebfac94672e1dbe715443e1e4cbb55855e34283892eb63d6fbc525c0f549d11cae1abb5bf62b284 SHA512 3e18eb07b99cef073fc4d74a4cc200ca1d37af9bc0df723184e4fed429d7f15e2c44f7b54889ec83bcd47c6bd3953f27b0368db3b4b693b21ace11ead62c2199 +AUX postinstall-en.txt 1108 BLAKE2B 0c717cffa57e8eda86867a86ca4127d9a1ddeed47046d938d6858636f69eb04973f8e38a799b7b5704d63c5a9b32a66cdde83ca39820212a2cfbceba1dc17cdf SHA512 497c1369e245bd072e9757fbe3c866c25e5aa92c37ed5f6f355fdf423b2c5f9608fad0754e6719de23b42eb6696bb88fa6eb48ee39f02ee617d38a7ed8dc346d DIST liquid_feedback_core-v2.2.6.tar.gz 127440 BLAKE2B d62ecd8c9947259a7213f92ecaf1491a5e858ff2fdaff5e020fc4ec0c433297d8a7701a812de200130a1ed7f08ded1d9f31d42de7fffa2981361efee0e31646c SHA512 6f680398a7d2e529e642dc94ba16bc1b33d25459ddbf629c06387391ef13c0e212a108cc337cd2bc29505f4f6436b6e92994e63eaa09fe1c07733d2821d9b7f1 DIST liquid_feedback_core-v3.0.4.tar.gz 142983 BLAKE2B 05e8c1630a8fa3932b4fc291843dd0c45e2333940394a0632309c9041dc850cc894a6cb54fb840329f67812ebcde5d540c338cf27a88ad428aaa066329725409 SHA512 baea8a61c94e640557d0169b6171247ff0303ff1a9c8b587c6769e367cf56805c1a1e660aadf7178d984182be6dde326770240b3ffeda42139c4a94445a2bbf8 +DIST liquid_feedback_core-v3.2.2.tar.gz 162505 BLAKE2B dc6e9d0b8d1e596150520e068e7743a6e839f7e6ffc3c605d090973a179652858c037c4f12c75774d158adfc60484d1ac321350fa7f8d16329043051ae2cd98c SHA512 60a3548008235822e83c6614e990d87200b342d8e5c5fd1ca1f6092bc48d918f9dbfcc130039f4acf2956a19100cc96187ac1c7f5174f7e69a45f651643ab1d9 EBUILD liquid_feedback_core-2.2.6.ebuild 1086 BLAKE2B d091aa4f795779aef747229c8bd43f68f97a899eee7aca3cdda3294ca234438af631ef91ae734f7196bd0f474abdd1b0302ff767717cc6688e95ac4f594a0586 SHA512 0e2cc1ac02db4e23680459ac98ace75f65d18957bf8f8d78fc1935c6ddb56f7c18a840226b94443776e08c0b64f2e1261090ddd5bb7b0ab66e53c5095b8fc895 EBUILD liquid_feedback_core-3.0.4.ebuild 949 BLAKE2B 38960552bb171e61add9aefcde4c0040c87f0ab15efbcf3323471236b7a6fc1d7401dacc036763b139978fff3bc8fe7f81f40bc93c350f31ea54103f4a84d365 SHA512 4dc83a60b2a87edc58fb19c6bf14699616c65085e7e1ab668ffa20c000ab749d1aed76609ff5a0dc2f49490b7bd61d8eae97f9c6f37fd52901b3de4befa75dc7 +EBUILD liquid_feedback_core-3.2.2.ebuild 983 BLAKE2B 900ba758a280d3c24027b9503f06d0b5a8b0ae1cf49095d1782cf2dc86c4088d415125a87add367041652bc152ed39c8b8f8e446154682d3ed120df80bacd212 SHA512 ad095a00be9f6cf486c0254ebc3593b33446c2110f96d5ab7ea394f466febc2838b2051018a27243b6dafe605432d3aaaa47522a7a7a6727d29f5ed5e1f1c559 MISC metadata.xml 1099 BLAKE2B c846e77c5b1531e4ea502b308146062803cd79f74b275cf131343fe5c9c6b0f86a107c84f40cf3be95910ed5b99174d0c9883836a06b535b2d4f08514c9b082e SHA512 1fbc5d0f4eff2085665038a48155b652d434ec42019a5343fe1c1ef34a7b863aa2f21636145d105cf9052ef0756400f29098f3017f948d3aa0fb854f89cd6ff0 diff --git a/www-apps/liquid_feedback_core/files/liquid_feedback_core-3.2.2-gentoo.patch b/www-apps/liquid_feedback_core/files/liquid_feedback_core-3.2.2-gentoo.patch new file mode 100644 index 000000000000..541464723f83 --- /dev/null +++ b/www-apps/liquid_feedback_core/files/liquid_feedback_core-3.2.2-gentoo.patch @@ -0,0 +1,51 @@ +--- a/lf_update_issue_order.c 2021-04-10 18:32:19.101947834 +0200 ++++ b/lf_update_issue_order.c 2021-04-10 18:36:07.377117090 +0200 +@@ -1,3 +1,5 @@ ++#define _GNU_SOURCE ++ + #include <stdlib.h> + #include <stdio.h> + #include <string.h> +@@ -417,7 +419,7 @@ + logging = 1; + } + for (i=argb; i<argc; i++) len += strlen(argv[i]) + 1; +- conninfo = malloc(len * sizeof(char)); ++ conninfo = malloc(len * sizeof(char) + 1); + if (!conninfo) { + fprintf(stderr, "Error: Could not allocate memory for conninfo string.\n"); + abort(); +--- a/lf_update_suggestion_order.c 2021-04-10 18:38:31.138743181 +0200 ++++ b/lf_update_suggestion_order.c 2021-04-10 18:39:29.851786017 +0200 +@@ -1,3 +1,5 @@ ++#define _GNU_SOURCE ++ + #include <stdlib.h> + #include <stdio.h> + #include <string.h> +@@ -474,7 +476,7 @@ + logging = 1; + } + for (i=argb; i<argc; i++) len += strlen(argv[i]) + 1; +- conninfo = malloc(len * sizeof(char)); ++ conninfo = malloc(len * sizeof(char) + 1); + if (!conninfo) { + fprintf(stderr, "Error: Could not allocate memory for conninfo string.\n"); + abort(); +--- a/lf_update.c 2021-04-10 18:40:48.036510216 +0200 ++++ b/lf_update.c 2021-04-10 18:55:46.869758233 +0200 +@@ -1,3 +1,5 @@ ++#define _GNU_SOURCE ++ + #include <stdlib.h> + #include <stdio.h> + #include <string.h> +@@ -51,7 +53,7 @@ + { + size_t len = 0; + for (i=1; i<argc; i++) len += strlen(argv[i]) + 1; +- conninfo = malloc(len * sizeof(char)); ++ conninfo = malloc(len * sizeof(char) + 1); + if (!conninfo) { + fprintf(stderr, "Error: Could not allocate memory for conninfo string\n"); + return 1; diff --git a/www-apps/liquid_feedback_core/files/postinstall-en.txt b/www-apps/liquid_feedback_core/files/postinstall-en.txt index 128c7b20ee7d..e1eb550eeea1 100644 --- a/www-apps/liquid_feedback_core/files/postinstall-en.txt +++ b/www-apps/liquid_feedback_core/files/postinstall-en.txt @@ -1,25 +1,22 @@ -Merge info from README file with these. - To use Liquid Feedback you have to follow these simple steps, which have to be done as the postgres system user (or which ever is the database superuser): -$ createuser liquid_feedback -and answer the following -Shall the new role be a superuser? (y/n) n -Shall the new role be allowed to create databases? (y/n) y -Shall the new role be allowed to create more new roles? (y/n) n +$ createuser -d liquid_feedback $ psql postgres=# ALTER USER liquid_feedback WITH PASSWORD 'the_new_password'; $ createdb -U liquid_feedback liquid_feedback $ psql -U liquid_feedback liquid_feedback -liquid_feedback=# \i /usr/share/liquid_feedback_code/core.sql -liquid_feedback=# \i /usr/share/liquid_feedback_code/init.sql +liquid_feedback=# \i /usr/share/liquid_feedback_core/core.sql INSERT INTO system_setting (member_ttl) VALUES ('1 year'); INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (false, '1 hour', 20, 6); INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (false, '1 day', 80, 12); INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (true, '1 hour', 200, 60); INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (true, '1 day', 800, 120); -INSERT INTO policy (index, name, admission_time, discussion_time, verification_time, voting_time, issue_quorum_num, issue_quorum_den, initiative_quorum_num, initiative_quorum_den) VALUES (1, 'Default policy', '8 days', '15 days', '8 days', '15 days', 10, 100, 10, 100); + +and Create an invite code for an admin user: + +$ psql -U liquid_feedback liquid_feedback +liquid_feedback=# INSERT INTO member (invite_code, admin) VALUES ('sesam', true); diff --git a/www-apps/liquid_feedback_core/liquid_feedback_core-3.2.2.ebuild b/www-apps/liquid_feedback_core/liquid_feedback_core-3.2.2.ebuild new file mode 100644 index 000000000000..13d55279376a --- /dev/null +++ b/www-apps/liquid_feedback_core/liquid_feedback_core-3.2.2.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +MY_P=${PN}-v${PV} + +DESCRIPTION="Internet platforms for proposition development and decision making" +HOMEPAGE="https://www.public-software-group.org/liquid_feedback" +SRC_URI="https://www.public-software-group.org/pub/projects/liquid_feedback/backend/v${PV}/${MY_P}.tar.gz" + +LICENSE="HPND CC-BY-2.5" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND="dev-db/postgresql:=" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +PATCHES=( + "${FILESDIR}"/${PN}-3.0.4-gentoo.patch + "${FILESDIR}"/${P}-gentoo.patch +) + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS}" \ + CPPFLAGS="-I $(pg_config --includedir)" \ + LDFLAGS="${LDFLAGS} -L $(pg_config --libdir)" +} + +src_install() { + dobin lf_update lf_update_suggestion_order lf_export + insinto /usr/share/${PN} + doins -r {core,init,demo,test}.sql update + dodoc README "${FILESDIR}"/postinstall-en.txt +} |