Skip to content

Commit eda7401

Browse files
author
cvs
committed
cvsimport
2 parents fbf7fe4 + 410cc22 commit eda7401

13 files changed

+419
-103
lines changed

.cvsignore

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ help-admin-de.txt
2121
help-admin-en.txt
2222
help-admin-it.txt
2323
help-admin-fr.txt
24+
help-admin-tr.txt
2425
i.sh
2526
iroffer
2627
iroffer.1.txt

Configure

+87-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
#
33
# SPDX-FileCopyrightText: 2005 David Johnson
4-
# SPDX-FileCopyrightText: 2005-2021 Dirk Meyer
4+
# SPDX-FileCopyrightText: 2005-2025 Dirk Meyer
55
# SPDX-License-Identifier: GPL-2.0-only
66
#
77
# $Id$
@@ -878,11 +878,12 @@ __attribute__ ((noreturn))
878878
#endif
879879
main (int argc, char **argv)
880880
{
881-
(void)argc;
882-
(void)argv;
883881
"
884882

885-
main2=" exit(0);
883+
main2="
884+
(void)argc;
885+
(void)argv;
886+
exit(0);
886887
}"
887888

888889
main0="${main1}${main2}"
@@ -920,6 +921,49 @@ else
920921
${msg} " ${irt_no}"
921922
fi
922923

924+
${msg} -n "${irt_seeingif} $cctype ${irt_accepts} '-Wno-unreachable-code'... "
925+
echo "
926+
#include <stdlib.h>
927+
${main0}" > config.temp.c
928+
if $cctype -o config.temp -Wno-unreachable-code $CFLAGS config.temp.c $LDFLAGS $libs $LIBS; then
929+
${msg} "${irt_yes}"
930+
NOUNREACH="-Wno-unreachable-code"
931+
else
932+
${msg} " ${irt_no}"
933+
fi
934+
935+
${msg} -n "${irt_seeingif} $cctype ${irt_accepts} '-Wno-padded'... "
936+
echo "
937+
#include <stdlib.h>
938+
${main0}" > config.temp.c
939+
if $cctype -o config.temp -Wno-padded $CFLAGS config.temp.c $LDFLAGS $libs $LIBS; then
940+
${msg} "${irt_yes}"
941+
NOPADDED="-Wno-padded"
942+
else
943+
${msg} " ${irt_no}"
944+
fi
945+
946+
${msg} -n "${irt_seeingif} $cctype ${irt_accepts} '-Wno-system-headers'... "
947+
echo "
948+
#include <stdlib.h>
949+
${main0}" > config.temp.c
950+
if $cctype -o config.temp -Wno-system-headers $CFLAGS config.temp.c $LDFLAGS $libs $LIBS; then
951+
${msg} "${irt_yes}"
952+
CFLAGS="${CFLAGS} -Wno-system-headers"
953+
else
954+
${msg} " ${irt_no}"
955+
fi
956+
957+
${msg} -n "${irt_seeingif} $cctype ${irt_accepts} '--system-header-prefix=/usr'... "
958+
echo "
959+
#include <stdlib.h>
960+
${main0}" > config.temp.c
961+
if $cctype -o config.temp --system-header-prefix=/usr $CFLAGS config.temp.c $LDFLAGS $libs $LIBS; then
962+
${msg} "${irt_yes}"
963+
CFLAGS="${CFLAGS} --system-header-prefix=/usr --system-header-prefix=/usr/local/include"
964+
else
965+
${msg} " ${irt_no}"
966+
fi
923967

924968
${msg} -n "${irt_seeing16bit}... "
925969
echo "
@@ -1061,7 +1105,7 @@ ${msg} -n "${irt_endianness}... "
10611105
echo "${irmain1}
10621106
printf(\"%s\", (100 == ntohl(100)) ? \"big\" : \"little\");
10631107
${main2}" > config.temp.c
1064-
if $cctype -o config.temp $WARNS $WERROR $CFLAGS config.temp.c $LDFLAGS $libs $LIBS && [ "`./config.temp`" = "big" ]; then
1108+
if $cctype -o config.temp $WARNS $WERROR $NOUNREACH $CFLAGS config.temp.c $LDFLAGS $libs $LIBS && [ "`./config.temp`" = "big" ]; then
10651109
${msg} "${irt_endianbig}"
10661110
echo "#define IR_ENDIAN_BIG" >> src/iroffer_config.h
10671111
elif [ "`./config.temp`" = "little" ]; then
@@ -1083,7 +1127,7 @@ echo "${irmain1}
10831127
(void)array;
10841128
close(fd);
10851129
${main2}" > config.temp.c
1086-
if $cctype -o config.temp -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $WARNS $WERROR $CFLAGS config.temp.c $LDFLAGS $libs $LIBS; then
1130+
if $cctype -o config.temp -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $WARNS $WERROR -Wno-declaration-after-statement $CFLAGS config.temp.c $LDFLAGS $libs $LIBS; then
10871131
${msg} "${irt_yes}"
10881132
echo "#define _FILE_OFFSET_BITS 64" >> src/iroffer_config.h
10891133
echo "#define _LARGEFILE_SOURCE" >> src/iroffer_config.h
@@ -1158,7 +1202,8 @@ fi
11581202

11591203
${msg} -n "${irt_checkfor} snprintf()... "
11601204
echo "${irmain1}
1161-
char *s=0; snprintf(s,10,\"blah\");
1205+
char *s=0;
1206+
snprintf(s,10,\"blah\");
11621207
${main2}" > config.temp.c
11631208
if $cctype -o config.temp $WARNS $WERROR $CFLAGS config.temp.c $LDFLAGS $libs $LIBS; then
11641209
${msg} "${irt_found}"
@@ -1266,7 +1311,8 @@ fi
12661311

12671312
${msg} -n "${irt_checkfor} statvfs()... "
12681313
echo "${irmain1}
1269-
struct statvfs stf; statvfs(\"\",&stf);
1314+
struct statvfs stf;
1315+
statvfs(\"\",&stf);
12701316
${main2}" > config.temp.c
12711317
if $cctype -o config.temp $WARNS $WERROR $CFLAGS config.temp.c $LDFLAGS $libs $LIBS; then
12721318
${msg} "${irt_found}"
@@ -1277,7 +1323,8 @@ fi
12771323

12781324
${msg} -n "${irt_checkfor} statfs()... "
12791325
echo "${irmain1}
1280-
struct statfs stf; statfs(\"\",&stf);
1326+
struct statfs stf;
1327+
statfs(\"\",&stf);
12811328
${main2}" > config.temp.c
12821329
if $cctype -o config.temp $WARNS $WERROR $CFLAGS config.temp.c $LDFLAGS $libs $LIBS; then
12831330
${msg} "${irt_found}"
@@ -1323,6 +1370,8 @@ fi
13231370
${msg} -n "${irt_seeingif} crypt() ${irt_works} ${irt_asexpected}... "
13241371
echo "${irmain1}
13251372
char *pwout;
1373+
(void)argc;
1374+
(void)argv;
13261375
pwout = crypt(\"testtest\",\"LH\");
13271376
if (pwout && !strcmp(\"LHD/pLKwfn0.k\", pwout)) {
13281377
fputs(\"result: <plain> \", stderr);
@@ -1570,6 +1619,8 @@ fi
15701619
${msg} -n "${irt_checkfor} gethostbyname() error ${irt_values}... "
15711620
echo "${irmain1}
15721621
int i;
1622+
(void)argc;
1623+
(void)argv;
15731624
switch (h_errno) {
15741625
case HOST_NOT_FOUND:
15751626
case NO_ADDRESS:
@@ -1610,6 +1661,7 @@ if $OPT_KQUEUE; then
16101661
${msg} -n "${irt_checkfor} kqueue() ... "
16111662
echo "${irheaders}
16121663
#include <sys/event.h>
1664+
extern int ir_kqueue_fd;
16131665
int ir_kqueue_fd;
16141666
${main1}
16151667
ir_kqueue_fd = kqueue ();
@@ -1629,7 +1681,7 @@ if $OPT_GEOIP; then
16291681
${main1}
16301682
MMDB_open(NULL, MMDB_MODE_MMAP, NULL);
16311683
${main2}" > config.temp.c
1632-
if $cctype -o config.temp -DUSE_MAXMINDDB $WARNS $WERROR $CFLAGS "-I${LOCALBASE}/include" config.temp.c "-L${LOCALBASE}/lib" -lmaxminddb $LDFLAGS $libs $LIBS; then
1684+
if $cctype -o config.temp -DUSE_MAXMINDDB $WARNS $NOPADDED $WERROR $CFLAGS "-I${LOCALBASE}/include" config.temp.c "-L${LOCALBASE}/lib" -lmaxminddb $LDFLAGS $libs $LIBS; then
16331685
${msg} "${irt_found}"
16341686
echo "#define USE_MAXMINDDB" >> src/iroffer_config.h
16351687
FEATURES="${FEATURES},geoip2"
@@ -1639,14 +1691,14 @@ ${main2}" > config.temp.c
16391691
fi
16401692
fi
16411693

1642-
if $OPT_GEOIP; then
1643-
${msg} -n "${irt_seeingif_lib} GeoIP ${irt_lib_exists}... "
1694+
if $OPT_GEOIP && [ "${MAXMINDDBLIB}" = '' ] ; then
1695+
${msg} -n "${irt_seeingif_lib} GeoIP1 ${irt_lib_exists}... "
16441696
echo "${irheaders}
16451697
#include <GeoIP.h>
16461698
${main1}
16471699
GeoIP_country_code_by_addr(NULL, NULL);
16481700
${main2}" > config.temp.c
1649-
if $cctype -o config.temp -DUSE_GEOIP $WARNS $WERROR $CFLAGS "-I${LOCALBASE}/include" config.temp.c "-L${LOCALBASE}/lib" -lGeoIP $LDFLAGS $libs $LIBS; then
1701+
if $cctype -o config.temp -DUSE_GEOIP $WARNS $NOPADDED $WERROR $CFLAGS "-I${LOCALBASE}/include" config.temp.c "-L${LOCALBASE}/lib" -lGeoIP $LDFLAGS $libs $LIBS; then
16501702
${msg} "${irt_found}"
16511703
echo "#define USE_GEOIP" >> src/iroffer_config.h
16521704
FEATURES="${FEATURES},geoip"
@@ -1659,7 +1711,7 @@ ${main2}" > config.temp.c
16591711
${main1}
16601712
struct in6_addr remoteip; inet_pton(AF_INET6, 0, &remoteip); GeoIP_country_code_by_ipnum_v6(NULL, remoteip);
16611713
${main2}" > config.temp.c
1662-
if $cctype -o config.temp -DUSE_GEOIP6 $WARNS $WERROR $CFLAGS ${GEOINC} config.temp.c ${GEOLDF} ${GEOLIB} $LDFLAGS $libs $LIBS; then
1714+
if $cctype -o config.temp -DUSE_GEOIP6 $WARNS $NOPADDED $WERROR $CFLAGS ${GEOINC} config.temp.c ${GEOLDF} ${GEOLIB} $LDFLAGS $libs $LIBS; then
16631715
FEATURES="${FEATURES}6"
16641716
${msg} "${irt_found}"
16651717
echo "#define USE_GEOIP6" >> src/iroffer_config.h
@@ -1690,7 +1742,7 @@ ${main1}
16901742
#endif /* UPNPDISCOVER_SUCCESS */
16911743
#endif
16921744
${main2}" > config.temp.c
1693-
if $cctype -o config.temp -DUSE_UPNP $WARNS $WERROR $CFLAGS "-I${LOCALBASE}/include" config.temp.c "-L${LOCALBASE}/lib" -lminiupnpc $LDFLAGS $libs $LIBS; then
1745+
if $cctype -o config.temp -DUSE_UPNP $WARNS $NOPADDED $WERROR $CFLAGS "-I${LOCALBASE}/include" config.temp.c "-L${LOCALBASE}/lib" -lminiupnpc $LDFLAGS $libs $LIBS; then
16941746
${msg} "${irt_found}"
16951747
echo "#define USE_UPNP" >> src/iroffer_config.h
16961748
FEATURES="${FEATURES},upnp"
@@ -1710,7 +1762,7 @@ if $OPT_CURL; then
17101762
${main1}
17111763
curl_global_cleanup();
17121764
${main2}" > config.temp.c
1713-
if $cctype -o config.temp -DUSE_CURL $WARNS $CFLAGS `curl-config --cflags` config.temp.c "-L${LOCALBASE}/lib" `curl-config --libs` $LDFLAGS $libs $LIBS; then
1765+
if $cctype -o config.temp -DUSE_CURL $WARNS $NOPADDED $CFLAGS `curl-config --cflags` config.temp.c "-L${LOCALBASE}/lib" `curl-config --libs` $LDFLAGS $libs $LIBS; then
17141766
${msg} "${irt_found}"
17151767
echo "#define USE_CURL" >> src/iroffer_config.h
17161768
FEATURES="${FEATURES},curl"
@@ -1796,6 +1848,25 @@ if $OPT_RUBY; then
17961848
fi
17971849
${msg} -n "${irt_seeingif_lib} libruby ${irt_lib_exists} (${irt_for} RUBY-Scripts)... "
17981850
echo "
1851+
#pragma GCC diagnostic ignored \"-Wpadded\"
1852+
#pragma GCC diagnostic ignored \"-Wpedantic\"
1853+
#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
1854+
#pragma GCC diagnostic ignored \"-Wredundant-decls\"
1855+
#pragma GCC diagnostic ignored \"-Wunused-parameter\"
1856+
#pragma GCC diagnostic ignored \"-Wcast-qual\"
1857+
#pragma GCC diagnostic ignored \"-Wsign-conversion\"
1858+
#ifdef __clang__
1859+
#pragma GCC diagnostic ignored \"-Wgcc-compat\"
1860+
#pragma GCC diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"
1861+
#pragma clang diagnostic ignored \"-Wunknown-warning-option\"
1862+
#pragma clang diagnostic ignored \"-Wdisabled-macro-expansion\"
1863+
#pragma clang diagnostic ignored \"-Wdocumentation\"
1864+
#pragma clang diagnostic ignored \"-Wdocumentation-unknown-command\"
1865+
#pragma clang diagnostic ignored \"-Wdeclaration-after-statement\"
1866+
#pragma clang diagnostic ignored \"-Walloca\"
1867+
#pragma clang diagnostic ignored \"-Wc23-extensions\"
1868+
#pragma clang diagnostic ignored \"-Wshift-sign-overflow\"
1869+
#endif
17991870
#include \"ruby.h\"
18001871
${main1}
18011872
ruby_init(); ruby_finalize();

doc/INSTALL-linux-tr.txt

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
Iroffer-Dinoex'in GNU/Linux üzerinde kullanıcı olarak kurulumu
2+
3+
Kurulum süreci
4+
5+
1. Kullanıcı olarak "/home" dizinine gidiyoruz.
6+
cd
7+
8+
2. iroffer için yeni bir dizin oluşturun.
9+
mkdir iroffer
10+
cd iroffer/
11+
12+
3. İnternet üzerinden programın kaynak kodunu indirin.
13+
wget https://iroffer.net/iroffer-dinoex-snap.tar.gz
14+
15+
4. Kaynak kod arşivini açın.
16+
tar -xvzf iroffer-dinoex-snap.tar.gz
17+
18+
5. Kaynak kodu sizin GNU/Linux sürümünüz için yapılandırın.
19+
cd iroffer-dinoex-snap
20+
./Configure -curl -geoip -ruby
21+
22+
6. Şayet "Configure" bazı hatlar görüntülüyorsa, hâlâ bazı paketler
23+
eksik demektir.
24+
Debian ile:
25+
sudo apt-get install make
26+
sudo apt-get install gcc
27+
sudo apt-get install libc-dev
28+
sudo apt-get install libcurl4-openssl-dev
29+
sudo apt-get install libmaxminddb-dev
30+
sudo apt-get install libssl-dev
31+
sudo apt-get install libminiupnpc-dev
32+
sudo apt-get install ruby-dev
33+
sudo apt-get install ruby
34+
35+
7. Programı Türkçe metinler ile derliyoruz.
36+
make tr
37+
38+
8. Programı doğru konuma kopyalıyoruz.
39+
cp -p iroffer-tr ..
40+
cp *.html ..
41+
cp -r htdocs ../
42+
43+
9. Yapılandırmamızı kopyalayarak başlıyoruz.
44+
cp misal.config ../mybot.config
45+
cd ..
46+
chmod 600 mybot.config
47+
48+
10. Sadece "bot" kullanıcısının yazma izinleri olmalı.
49+
chmod 700 .
50+
51+
11. Yönetim için bir parola oluşturacağız.
52+
./iroffer-tr -c mybot.config
53+
54+
12. Tüm dizinleri "mybot.config" yapılandırma dosyasında giriyoruz.
55+
"adminhost" doğru şekilde girilmelidir. Dahili site
56+
etkinleştirilmiştir.
57+
Dosyalar için temel bir dizin ekliyoruz ve onu gönderilen dosyalar
58+
için de kullanıyoruz.
59+
"mybot.config" şunları içermelidir:
60+
http_port 8000
61+
http_dir htdocs
62+
filedir /home/bot/files
63+
uploaddir /home/bot/files
64+
65+
('bot' yerine kendi oturum isminizi koyun)
66+
13. Dosyalar için dizini oluşturuyoruz.
67+
cd ..
68+
mkdir files
69+
70+
Dosyaları daha sonra XDCC veya FTP ile göndereceğiz.
71+
14. Başlatma betiği oluşturuyoruz.
72+
cd ..
73+
74+
ardından
75+
nano -w start-iroffer.sh
76+
77+
veya
78+
vim start-iroffer.sh
79+
80+
Betiği yazıyoruz:
81+
#!/bin/sh
82+
cd /home/bot/iroffer
83+
./iroffer-tr -b /home/bot/iroffer/mybot.config
84+
85+
('bot' yerine kendi oturum isminizi koyun)
86+
15. Betiği çalıştırılabilir hale getiriyoruz.
87+
chmod +x start-iroffer.sh
88+
89+
16. Başlatıyoruz.
90+
sh start-iroffer.sh
91+
92+
XDCC artık çalışmalıdır.

0 commit comments

Comments
 (0)