summaryrefslogtreecommitdiff
path: root/net-irc/ultimate
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-irc/ultimate
reinit the tree, so we can have metadata
Diffstat (limited to 'net-irc/ultimate')
-rw-r--r--net-irc/ultimate/Manifest14
-rw-r--r--net-irc/ultimate/files/ultimate-3.0.2-config.patch.in30
-rw-r--r--net-irc/ultimate/files/ultimate-3.0.2-entropy-path.patch58
-rw-r--r--net-irc/ultimate/files/ultimate-3.0.2-make-failfast.patch76
-rw-r--r--net-irc/ultimate/files/ultimate-3.0.2-open-mode.patch63
-rw-r--r--net-irc/ultimate/files/ultimate-3.0.2-system-zlib-r1.patch53
-rw-r--r--net-irc/ultimate/files/ultimateircd.conf5
-rw-r--r--net-irc/ultimate/files/ultimateircd.conf.25
-rw-r--r--net-irc/ultimate/files/ultimateircd.rc20
-rw-r--r--net-irc/ultimate/files/ultimateircd.rc.220
-rw-r--r--net-irc/ultimate/metadata.xml7
-rw-r--r--net-irc/ultimate/ultimate-3.0.2-r2.ebuild94
12 files changed, 445 insertions, 0 deletions
diff --git a/net-irc/ultimate/Manifest b/net-irc/ultimate/Manifest
new file mode 100644
index 000000000000..0f1d9d221b22
--- /dev/null
+++ b/net-irc/ultimate/Manifest
@@ -0,0 +1,14 @@
+AUX ultimate-3.0.2-config.patch.in 1390 SHA256 2e8b6c7782ec5c8af29467a704c8542691306987b1ceb699b9d27d9574f48d9d SHA512 73cbec361c5bd78481edbfdda84cd923d8c6fd39c5f952f66e52c80846184e61a5694714472956632efcbaf68470f4f2b52a9db9e55a3993e3cebddd787129b3 WHIRLPOOL 27a64ab08145e388df496715532272c0c7ae0103649b1b48c704901c828bbaa39dab31445c73518103cc4f121a59ddc597085a3abaafcae49f1a24931ddc8b57
+AUX ultimate-3.0.2-entropy-path.patch 1578 SHA256 41fc97b9817108f2288bd304a7c2e84707b68efe45c484c32f23892334f2fedc SHA512 430fceae45bae19eb0224461664c02a9e1a49ec26a40ff7032d7446e36bc1d9101a3aa70a1ad1a054fc38d25a775417ec55581057dfedc59ff5ba4046281b7ee WHIRLPOOL 3dc90dab7a1f6d4e73068958155da799f3d7fddb54f856e877a7f3248f69e15b20081f37951acda75c2833edd725ee87ee7b8d89eb4140b1bd4e8451d6d0a418
+AUX ultimate-3.0.2-make-failfast.patch 1693 SHA256 e07dab5efc3ea3ca5af4930775e96599ea1de660006d4d300b358f7b00a7c999 SHA512 8d5a40bdbb83504cf0d7ef56a4b31f4bbe205b6dbe9d86337dd2374fc216915f601bdeba5ba13c7eb9d8381c541d408606b4cc236a849f58210b0ded76668672 WHIRLPOOL 09028cfcbaa45f73d25a5b45f712a244982e80b608166979f4e811fad0f5f8072064e98a1042e5115ebe0ce7758d48d3aa47b3df6562e8d08e67df00dea5532c
+AUX ultimate-3.0.2-open-mode.patch 2758 SHA256 b31addc28d05c925ca34dd314435d3482a8b27a9be6300d1112bb592bdae638a SHA512 f1ffc168f8f3b51779cb45397428e7c010829960f7b466ca3027a49b9a5c6519c9eff52e750c31c642e86e3d59939f4419dc9394d9970198073ffb7ed0ad68ab WHIRLPOOL 21a451bc50af04b1f51e3574448968d1fa485b0c78590f5e40a5bde97f8cbe22aa2bf897c2c4e99b103def7066c4572a015ed94af3ea9f3c44b3eb37eed63f83
+AUX ultimate-3.0.2-system-zlib-r1.patch 1640 SHA256 305c10668d64fd856ed989ee8f03376dd20c9670df0e74a2c88b0bdf36c374c8 SHA512 f1f3c4f26449b648a81899803524fde4e14092e0b1aa9bf7a85e12a048e2b7fe64ef8a8ec33e13c60129f4875fdb4621c441f29804a917d4a137bb2e51a6a95d WHIRLPOOL 2956f3f4f1a166870e3201728441bc0f10a5f48ee1495f320dcf6f5a7c2e2b60d8614ccccbd19ba452238dac7fed6f9aca9402b4c12fc42f27a086d92bd2009b
+AUX ultimateircd.conf 166 SHA256 a57b9259ed268833948f7c93b3d766da86cbd56361031a2f667214d853a92569 SHA512 380c7975e7c41001af68f549adf6f7557e833408e0ff6867492304cbb86b6b12d17d6ec56d1a3c5929cade97f71c12ca88efed38c0e4940b9ad236114a55b0d4 WHIRLPOOL 5cb6bd9290b962f9d762c437da9189ce4ef7c88d0614136b93033f984ec946cff18600e9d9e9979f4997cae2591de2e45ba9014eb5e0aab95848cb7a880ae0f9
+AUX ultimateircd.conf.2 171 SHA256 8d95f76d26faa8763ec2b56c07fe8f293bf13276e5049b906a93503db2c77d19 SHA512 5a84ce6a81621113bfd12a7f356bf4d10619281e70398ff7de52b4279cf96001554e48b74deac40062c186babc4db9ea96aa9f52bb8927755169e457e0daec73 WHIRLPOOL 7a6094507a3e532ca0f27f8c1bdb1325d62fae117586cd3c2cf167636e239c58192dc4710f2b75d42bff87e02219f4362e8571885786d8f30a56eb0e8a96d59d
+AUX ultimateircd.rc 400 SHA256 e10b7c87d43a32cdb4d569f01d443560e77cd9b48222841555a95a7e395f0462 SHA512 1bf0612679ac161e0c68fd68d45b91949154a7c5cef67cabd0e3e6f4ca6ca6eb97a3e162dde04309c017da6f68be954675e0036d33ba8daa13eb93ecfb46f58c WHIRLPOOL b368ad44154d785773a464578a544276ef2087a08338b224f56c9d63bef5772a50e20765bd411919c916cf832036a4ff7d7f0068f7bd3284700c9d5f5190c415
+AUX ultimateircd.rc.2 426 SHA256 8a451b75ada2704398c9d595846fbc7f8597e8090709e9739e0b5102f27459c4 SHA512 09753fae82165dfa5faeaf98ee3378d4b15f7e9db9d807726fa275691891ff45c9e258dcb2a547371d2bb959b7ea10e5aeecc0848a502ab956a6b7bfea4411de WHIRLPOOL 304003374a53ec947eaee6f3ea4090e606a850e2765d6411dec9e78df252c55b2634ca535ab9d0fcf404a5855610aec9cb815ae333902f8161895d42db2905b2
+DIST Ultimate3.0.2.tar.bz2 615944 SHA256 b4564f76d074b3bafde6a7d2cdc8da177759949ed933979d801d107dc6fd8934 SHA512 ed79f7f63faaa08fc901cfe58df430a051a6e0cc15b7484851f659fe2b5f23bb4b0235d8cc131284d9b6373d2da1b5d1376908d59dd0fc73496ac2d4561170ed WHIRLPOOL 822bb5bb8e0117d3fe1776852ddcec24a5d1582af9e318010c5ecfdb183139d5f0468755b80aade5c1bbcefc94be6e87aaa191054030a6887aee8097d2f40b6a
+EBUILD ultimate-3.0.2-r2.ebuild 2452 SHA256 8c24c3177b5f4c58441637cf29135fd48556e9534e8fc8e28b8d38d210a5d8da SHA512 307e30025cccefba97694c02ee71d0e27aefae4d7f2ce2c9573a726ba7916c11c70d07a3744578265e6d2d0ee4e35cf8783cdff1d39465a082e52f3830c79aae WHIRLPOOL 1f6f79f3d33f43bc04669d9d8969e2855b975682abba24a86a75fc1ebcfdc042c14230c4a902698b28a2cc2ac86a95b9b9f58562b3fed261e9873bf5804d3807
+MISC ChangeLog 3148 SHA256 e8922bd088339741f3a8f46d060e800d5eccf440a46a547b099ad8c848df7b65 SHA512 9f59953b63087b451c91cf205e618208d4b77521b118c57bd16873d66eed9384a34dde4f3222fca9bf3d2c2e23574f1a101f30b37396df997090864bdf992b14 WHIRLPOOL 974e9861540619c72ba76633b0e4fe15633286c43bb4aa47e83ce3e832c804bf278471a57ca9d0fef99401bdcbbd9195257aad82b21b88476cc976febb5105f0
+MISC ChangeLog-2015 4470 SHA256 2892534f12ce72c25ae28ea9ff4f3054b195594728a41d63ce0d9679c7a03646 SHA512 e5c1fc3c892a1c9c54e43bc58f0186500f372f8bd28cadba999744867021bca37d836fc6b9829313729947ae9539af4f07f015cc4daf0b5f0ccaa98737803546 WHIRLPOOL 1a9eba910d2e0fd44ef46903b2af1f3b12376778575dc60959698d39dc08134b0f10091ea5c7b470a26419de410988115d788584ddf1f520784205eeffecf5ce
+MISC metadata.xml 221 SHA256 dd72b3ab795128cd1e7a2f159882cda07df9a86c29d83eaf6263e62f66449f12 SHA512 be16352d6b60adffe0c7459102ad6289db9380e31f7b5d2b4475d19496e7c91af4181b3a4d717a2473b754412d5a4eab3c62a9538c96fe272d6816c2b53252f3 WHIRLPOOL 3f70f915c6a2a68ddd1c647999a326ac515b18174cf76ee4b666c80d29d4f5f09f176f3702af6705b96bf24c7991ea95e3973ac6f39f15b92e463f76a007bc1b
diff --git a/net-irc/ultimate/files/ultimate-3.0.2-config.patch.in b/net-irc/ultimate/files/ultimate-3.0.2-config.patch.in
new file mode 100644
index 000000000000..5cb512fe896c
--- /dev/null
+++ b/net-irc/ultimate/files/ultimate-3.0.2-config.patch.in
@@ -0,0 +1,30 @@
+diff -Nur Ultimate3.0.0.rc2.orig/include/config.h Ultimate3.0.0.rc2/include/config.h
+--- Ultimate3.0.0.rc2.orig/include/config.h 2005-01-30 15:01:45.677952244 +0100
++++ Ultimate3.0.0.rc2/include/config.h 2005-01-30 15:02:43.353895511 +0100
+@@ -127,13 +127,13 @@
+ #endif
+
+ /* dirs */
+-#define DPATH IRCD_PREFIX
++#define DPATH IRCD_PREFIX
+ #define BINPATH IRCD_PREFIX "/bin/"
+-#define ETCPATH IRCD_PREFIX "/etc"
+-#define LOGPATH IRCD_PREFIX "/logs"
++#define ETCPATH "@GENTOO_PORTAGE_EPREFIX@/etc/ultimateircd"
++#define LOGPATH "@GENTOO_PORTAGE_EPREFIX@/var/log/ultimateircd"
+
+ /* files */
+-#define SPATH BINPATH "/ircd" /* ircd executable */
++#define SPATH BINPATH "/ultimateircd" /* ircd executable */
+
+ #define CPATH ETCPATH "/ircd.conf" /* ircd.conf file */
+ #define DCONF ETCPATH "/ircd.ini" /* Dynamic Configuration File */
+@@ -144,7 +144,7 @@
+ #define SMPATH ETCPATH "/ircd.smotd" /* Short Message Of The Day */
+ #define OMPATH ETCPATH "/ircd.opermotd" /* Operator Message Of The Day */
+ #define RPATH ETCPATH "/ircd.rules" /* Rules File */
+-#define PPATH ETCPATH "/ircd.pid" /* IRCd PID */
++#define PPATH "@GENTOO_PORTAGE_EPREFIX@/var/run/ultimateircd/ircd.pid" /* IRCd PID */
+ #define IRCDSSL_CPATH ETCPATH "/ircd.crt" /* Client SSL */
+ #define IRCDSSL_KPATH ETCPATH "/ircd.key" /* Client SSL */
+
diff --git a/net-irc/ultimate/files/ultimate-3.0.2-entropy-path.patch b/net-irc/ultimate/files/ultimate-3.0.2-entropy-path.patch
new file mode 100644
index 000000000000..d99f29030723
--- /dev/null
+++ b/net-irc/ultimate/files/ultimate-3.0.2-entropy-path.patch
@@ -0,0 +1,58 @@
+From: Nathan Phillip Brink <ohnobinki@ohnopublishing.net>
+Subject: Store and retrieve entropy from a file in a directory
+ writable/readable by ultimateircd.
+Date: 2011/04/28
+
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -32,7 +32,7 @@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ CCDV = @CCDV@
+-CFLAGS = @IRC_CFLAGS@ -DIRCD_PREFIX=\"@prefix@\"
++CFLAGS = @IRC_CFLAGS@ -DIRCD_PREFIX=\"@prefix@\" -DLOCALSTATEDIR='"$(localstatedir)"'
+ LDFLAGS = @LDFLAGS@
+ MKDEP = @MKDEP@ -DIRCD_PREFIX=\"@prefix@\"
+ MV = @MV@
+--- a/src/dh.c
++++ b/src/dh.c
+@@ -214,10 +214,10 @@
+ printf ("Done.\n");
+ fclose (fp);
+
+- fp = fopen (".ircd.entropy", "w");
++ fp = fopen (LOCALSTATEDIR "/.ircd.entropy", "w");
+ if (!fp)
+ {
+- printf ("Could not open .ircd.entropy for writing: %s\n",
++ printf ("Could not open " LOCALSTATEDIR "/.ircd.entropy for writing: %s\n",
+ strerror (errno));
+ return 0;
+ }
+@@ -225,7 +225,7 @@
+ fwrite (randbuf, RAND_BYTES * 4, 1, fp);
+ fclose (fp);
+
+- RAND_load_file (".ircd.entropy", -1);
++ RAND_load_file (LOCALSTATEDIR "/.ircd.entropy", -1);
+
+ return 1;
+ }
+@@ -236,7 +236,7 @@
+ int ret;
+ time_t now;
+
+- ret = RAND_load_file (".ircd.entropy", -1);
++ ret = RAND_load_file (LOCALSTATEDIR "/.ircd.entropy", -1);
+ if (ret <= 0)
+ {
+ if (!make_entropy ())
+@@ -250,7 +250,7 @@
+ /* this is probably not too good, but it saves just writing
+ the whole state back to disk with no changes. */
+ RAND_seed (&now, 4);
+- RAND_write_file (".ircd.entropy");
++ RAND_write_file (LOCALSTATEDIR "/.ircd.entropy");
+
+ return 0;
+ }
diff --git a/net-irc/ultimate/files/ultimate-3.0.2-make-failfast.patch b/net-irc/ultimate/files/ultimate-3.0.2-make-failfast.patch
new file mode 100644
index 000000000000..fa13f814de6e
--- /dev/null
+++ b/net-irc/ultimate/files/ultimate-3.0.2-make-failfast.patch
@@ -0,0 +1,76 @@
+From: Nathan Phillip Brink <ohnobinki@ohnopublishing.net>
+Subject: Cause build failures to be fail-fast instead of going undetected.
+Date: 2011/04/27
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -43,7 +43,7 @@
+ @for i in $(SUBDIRS); do \
+ echo "Building $$i";\
+ cd $$i;\
+- ${MAKE} build; cd ..;\
++ ${MAKE} build || exit 1; cd ..;\
+ done
+ @echo ' '
+ @echo '================================================================='
+@@ -62,7 +62,7 @@
+ @for i in $(SUBDIRS); do \
+ echo "Building $$i [profile]";\
+ cd $$i;\
+- ${MAKEPROFILE} build; cd ..;\
++ ${MAKEPROFILE} build || exit 1; cd ..;\
+ done
+
+ clean:
+@@ -70,7 +70,7 @@
+ @for i in $(SUBDIRS); do \
+ echo "Cleaning $$i";\
+ cd $$i;\
+- ${MAKE} clean; cd ..;\
++ ${MAKE} clean || exit 1; cd ..;\
+ done
+ -@if [ -f include/setup.h ] ; then \
+ echo "To really restart installation, make distclean" ; \
+@@ -83,28 +83,28 @@
+ @for i in $(SUBDIRS); do \
+ echo "Cleaning $$i";\
+ cd $$i;\
+- ${MAKE} distclean; cd ..;\
++ ${MAKE} distclean || exit 1; cd ..;\
+ done
+
+ depend:
+ @for i in $(SUBDIRS); do \
+ echo "depend ==> $$i";\
+ cd $$i;\
+- ${MAKE} depend; cd ..;\
++ ${MAKE} depend || exit 1; cd ..;\
+ done
+
+ install: all
+ @for i in $(SUBDIRS); do \
+ echo "install ==> $$i";\
+ cd $$i;\
+- ${MAKE} install; \
++ ${MAKE} install || exit 1; \
+ cd ..; \
+ done
+
+ @for i in $(SUBDIRS2); do \
+ echo "install ==> $$i";\
+ cd $$i;\
+- ${MAKE} install; \
++ ${MAKE} install || exit 1; \
+ cd ../../; \
+ done
+
+--- a/tools/Makefile.in
++++ b/tools/Makefile.in
+@@ -68,6 +68,7 @@
+
+ build: all
+
++depend:
+
+ mkpasswd: $(mkpasswd_OBJECTS)
+ $(CCDV)$(CC) ${CFLAGS} ${LDFLAGS} -o mkpasswd $(mkpasswd_OBJECTS) $(IRCDLIBS)
diff --git a/net-irc/ultimate/files/ultimate-3.0.2-open-mode.patch b/net-irc/ultimate/files/ultimate-3.0.2-open-mode.patch
new file mode 100644
index 000000000000..30ec6c96e5d7
--- /dev/null
+++ b/net-irc/ultimate/files/ultimate-3.0.2-open-mode.patch
@@ -0,0 +1,63 @@
+From: Nathan Phillip Brink <ohnobinki@ohnopublishing.net>
+Subject: Provide the required third argument to open() when O_CREAT is
+ in the second argument.
+Date: 2011/04/28
+
+--- a/src/s_serv.c
++++ b/src/s_serv.c
+@@ -4603,7 +4603,7 @@
+
+ #else /* LOCKFILE - MDP */
+
+- if ((out = open (filename, O_RDWR | O_APPEND | O_CREAT)) == -1)
++ if ((out = open (filename, O_RDWR | O_APPEND | O_CREAT, 0600)) == -1)
+ {
+ sendto_one (source_p, ":%s NOTICE %s :Problem opening %s ",
+ me.name, parv[0], filename);
+@@ -7397,7 +7397,7 @@
+ syslog (LOG_INFO, "ADDCNLINE from %s for [%s] - Opening %s\n",
+ get_client_name (source_p, FALSE), parv[3], configfile);
+ #endif
+- if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT)) == -1)
++ if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT, 0600)) == -1)
+ {
+ sendto_one (source_p, ":%s NOTICE %s :Problem opening %s ",
+ me.name, parv[0], configfile);
+@@ -7770,7 +7770,7 @@
+ syslog (LOG_INFO, "ADDOPER from %s for [%s] - Opening %s\n",
+ get_client_name (source_p, FALSE), parv[3], configfile);
+ #endif
+- if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT)) == -1)
++ if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT, 0600)) == -1)
+ {
+ sendto_one (source_p, ":%s NOTICE %s :Problem opening %s ",
+ me.name, parv[0], configfile);
+@@ -8090,7 +8090,7 @@
+ syslog (LOG_INFO, "ADDQLINE from %s for [%s] - Opening %s\n",
+ get_client_name (source_p, FALSE), parv[1], configfile);
+ #endif
+- if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT)) == -1)
++ if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT, 0600)) == -1)
+ {
+ sendto_one (source_p, ":%s NOTICE %s :Problem opening %s ",
+ me.name, parv[0], configfile);
+@@ -8379,7 +8379,7 @@
+ syslog (LOG_INFO, "ADDHLINE from %s for [%s] - Opening %s\n",
+ get_client_name (source_p, FALSE), parv[1], configfile);
+ #endif
+- if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT)) == -1)
++ if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT, 0600)) == -1)
+ {
+ sendto_one (source_p, ":%s NOTICE %s :Problem opening %s ",
+ me.name, parv[0], configfile);
+@@ -8663,7 +8663,7 @@
+ syslog (LOG_INFO, "ADDULINE from %s for [%s] - Opening %s\n",
+ get_client_name (source_p, FALSE), parv[1], configfile);
+ #endif
+- if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT)) == -1)
++ if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT, 0600)) == -1)
+ {
+ sendto_one (source_p, ":%s NOTICE %s :Problem opening %s ",
+ me.name, parv[0], configfile);
+
+Diff finished. Thu Apr 28 00:15:19 2011
diff --git a/net-irc/ultimate/files/ultimate-3.0.2-system-zlib-r1.patch b/net-irc/ultimate/files/ultimate-3.0.2-system-zlib-r1.patch
new file mode 100644
index 000000000000..acbb71c73d42
--- /dev/null
+++ b/net-irc/ultimate/files/ultimate-3.0.2-system-zlib-r1.patch
@@ -0,0 +1,53 @@
+From: Nathan Phillip Brink <ohnobinki@ohnopublishing.net>
+Subject: Don't compile against internal zlib. Missing ./configure.ac
+ changes because ./configure.ac wasn't shipped with the dist
+ tarball.
+Date: 2011/04/27
+Subject: Use @ZLIB_LIBS@ and @ZLIB_CFLAGS@ instead of $(ZLIB_LIBS) and
+ friends because we don't get AC_SUBST() declared as Makefile
+ variables for free. https://bugs.gentoo.org/371889
+Date: 2011/06/16
+
+--- a/autoconf/configure.in
++++ b/autoconf/configure.in
+@@ -702,6 +702,8 @@
+ wi_ARG_DISABLE_CCDV
+ wi_PROG_CCDV
+
++PKG_CHECK_MODULES([ZLIB], [zlib])
++
+ AC_SUBST(SSL_INCLUDES)
+ AC_SUBST(SSL_LIBS)
+ AC_SUBST(ENCRYPT_SRC)
+@@ -716,7 +718,7 @@
+ AC_SUBST(SEDOBJ)
+ AC_SUBST(CCDV)
+
+-AC_OUTPUT(Makefile data/Makefile data/networks/Makefile src/Makefile tools/Makefile tools/ircdcron/Makefile tools/ssl-cert/Makefile zlib/Makefile)
++AC_OUTPUT(Makefile data/Makefile data/networks/Makefile src/Makefile tools/Makefile tools/ircdcron/Makefile tools/ssl-cert/Makefile)
+
+ echo
+ echo =================================================================
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -28,3 +28,3 @@
+ SHELL=/bin/sh
+-SUBDIRS=zlib src tools data @SUBDIR_MESSAGES@
++SUBDIRS = src tools data @SUBDIR_MESSAGES@
+ SUBDIRS2=data/networks tools/ircdcron tools/ssl-cert
+
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -53,9 +53,9 @@
+ SSL_LIBS = @SSL_LIBS@
+ SSL_INCLUDES = @SSL_INCLUDES@
+
+-IRCDLIBS = ../zlib/libz.a @LIBS@ $(SSL_LIBS)
++IRCDLIBS = @ZLIB_LIBS@ @LIBS@ $(SSL_LIBS)
+
+-INCLUDES = -I../include -I../zlib $(SSL_INCLUDES)
++INCLUDES = -I../include @ZLIB_CFLAGS@ $(SSL_INCLUDES)
+ CPPFLAGS = ${INCLUDES} @CPPFLAGS@
+
+ default: all
+
diff --git a/net-irc/ultimate/files/ultimateircd.conf b/net-irc/ultimate/files/ultimateircd.conf
new file mode 100644
index 000000000000..9955829f28d7
--- /dev/null
+++ b/net-irc/ultimate/files/ultimateircd.conf
@@ -0,0 +1,5 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# user to run ultimate-ircd as
+ULTIMATEIRCD_USER="nobody"
diff --git a/net-irc/ultimate/files/ultimateircd.conf.2 b/net-irc/ultimate/files/ultimateircd.conf.2
new file mode 100644
index 000000000000..8d2d2af3ab37
--- /dev/null
+++ b/net-irc/ultimate/files/ultimateircd.conf.2
@@ -0,0 +1,5 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# user to run ultimateircd as
+ULTIMATEIRCD_USER="ultimateircd"
diff --git a/net-irc/ultimate/files/ultimateircd.rc b/net-irc/ultimate/files/ultimateircd.rc
new file mode 100644
index 000000000000..8563d44ea412
--- /dev/null
+++ b/net-irc/ultimate/files/ultimateircd.rc
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use dns net
+}
+
+start() {
+ ebegin "Starting ultimate-ircd"
+ start-stop-daemon --start --quiet --exec /usr/bin/ultimate-ircd \
+ --chuid ${ULTIMATEIRCD_USER} &>/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Shutting down ultimate-ircd"
+ killall ultimate-ircd
+ eend $?
+}
diff --git a/net-irc/ultimate/files/ultimateircd.rc.2 b/net-irc/ultimate/files/ultimateircd.rc.2
new file mode 100644
index 000000000000..327e5f3a5392
--- /dev/null
+++ b/net-irc/ultimate/files/ultimateircd.rc.2
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use dns net
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --exec /usr/bin/ultimateircd \
+ --chuid ${ULTIMATEIRCD_USER}
+ eend $?
+}
+
+stop() {
+ ebegin "Shutting down ${SVCNAME}"
+ start-stop-daemon --stop --pidfile /var/run/ultimateircd/ircd.pid
+ eend $?
+}
diff --git a/net-irc/ultimate/metadata.xml b/net-irc/ultimate/metadata.xml
new file mode 100644
index 000000000000..1f6e4b59748b
--- /dev/null
+++ b/net-irc/ultimate/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <remote-id type="sourceforge">ultimate</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-irc/ultimate/ultimate-3.0.2-r2.ebuild b/net-irc/ultimate/ultimate-3.0.2-r2.ebuild
new file mode 100644
index 000000000000..f2f46b267897
--- /dev/null
+++ b/net-irc/ultimate/ultimate-3.0.2-r2.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+AT_M4DIR=autoconf
+inherit autotools eutils fixheadtails prefix ssl-cert user
+
+MY_P=Ultimate${PV/_/.}
+
+DESCRIPTION="An IRCd server based on DALnet's DreamForge IRCd"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
+HOMEPAGE="http://www.shadow-realm.org/"
+
+KEYWORDS="~amd64 ~ppc ~sparc x86 ~amd64-linux"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE="ssl"
+
+RDEPEND="sys-libs/zlib
+ ssl? ( dev-libs/openssl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ rm -rf zlib || die
+
+ cp "${FILESDIR}"/${P}-config.patch.in "${T}"/${P}-config.patch || die
+ eprefixify "${T}"/${P}-config.patch
+ epatch "${T}"/${P}-config.patch
+
+ epatch "${FILESDIR}"/${P}-system-zlib-r1.patch
+ epatch "${FILESDIR}"/${P}-make-failfast.patch
+ epatch "${FILESDIR}"/${P}-open-mode.patch
+ epatch "${FILESDIR}"/${P}-entropy-path.patch
+
+ mv autoconf/configure.in ./ || die
+ ht_fix_file configure.in
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --sysconfdir="${EPREFIX}"/etc/ultimateircd \
+ --localstatedir="${EPREFIX}"/var/lib/ultimateircd \
+ --disable-ccdv \
+ $(use_enable ssl openssl)
+}
+
+src_compile() {
+ # Must rerun the depend stage because we removed the zlib/ dir to
+ # which the stale dependencies still refer.
+ emake depend
+ emake
+}
+
+src_install() {
+ dodir /etc/ultimateircd
+ keepdir /var/{lib,log,run}/ultimateircd
+
+ einstall \
+ sysconfdir="${ED}"/etc/ultimateircd \
+ localstatedir="${ED}"/var/lib/ultimateircd \
+ networksubdir='$(sysconfdir)/networks'
+
+ rm -rf "${ED}"/usr/{{ircd,kill,rehash},bin/{ircdchk,ssl-{cert,search}.sh}} "${ED}"/var/lib/ultimateircd/logs || die
+ dosym /var/log/ultimateircd /var/lib/ultimateircd/logs
+
+ mv "${ED}"/usr/bin/ircd "${ED}"/usr/bin/ultimateircd || die
+ mv "${ED}"/usr/bin/mkpasswd "${ED}"/usr/bin/ultimateircd-mkpasswd || die
+
+ newinitd "${FILESDIR}"/ultimateircd.rc.2 ultimateircd
+ newconfd "${FILESDIR}"/ultimateircd.conf.2 ultimateircd
+}
+
+pkg_preinst() {
+ if ! use prefix; then
+ enewuser ultimateircd
+ fowners ultimateircd /var/{lib,log,run}/ultimateircd
+ fowners -R ultimateircd /etc/ultimateircd
+ fi
+
+ fperms -R go-rwx /etc/ultimateircd
+ fperms 0700 /var/{lib,log,run}/ultimateircd
+}
+
+pkg_postinst() {
+ if use ssl && [[ ! -e ${EROOT}etc/ultimateircd/ircd.crt ]]; then
+ install_cert /etc/ultimateircd/ircd
+ use prefix || chown ultimateircd "${EROOT}"etc/ultimateircd/ircd.{key,crt,pem}
+ fi
+}