-
Notifications
You must be signed in to change notification settings - Fork 3
/
INSTALL
92 lines (62 loc) · 2.21 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Metaphone PTBR
How to INSTALL (from source)
*************************************
* for PHP 5
go to php5 directory and you would do:
$ phpize5
$ ./configure
$ make
# make install
Newer versions of PHP have changed the way they enable extensions:
# mv -i /etc/php5/conf.d/metaphone_ptbr.ini /etc/php5/mods-available
In a single line:
phpize5 && ./configure && make && make install
if [ -d /etc/php5/mods-available ]; then
mv -i /etc/php5/conf.d/metaphone_ptbr.ini /etc/php5/mods-available && php5enmod metaphone_ptbr
fi
Old versions of PHP 5:
Now you can enable it on php.ini, by adding this line in config.ini
extension=metaphoneptbr.so
Testing:
php -qr 'echo metaphone_ptbr("teste")."\n";'
*************************************
* for PostgreSQL
[From README inside 'postgresql' directory]
Compatibility
-------------------------------------
x Tested with postgresql 8.3 and 8.4
* adapted to install on 9.1 too
1. Compiling
-------------------------------------
1. after unpacking the source tarball, go inside metaphoneptbr directory and run:
$ sudo pg_buildext install postgresql postgresql/%v postgresql-%v-metaphoneptbr
2a. How to install (8.3 or higher)
-------------------------------------
1. inside your database, load the file:
metaphone_ptbr.sql
which usually stays in:
/usr/share/postgresql/XX/contrib/metaphone_ptbr.sql
XX -> version of postgresql (8.3 or 8.4)
2b. How to install (9.1 or higher)
-------------------------------------
1. inside you database:
CREATE EXTENSION metaphoneptbr;
3. How to use
-------------------------------------
select metaphone_ptbr('Abcdefgh');
*************************************
* for command line program
go to the 'source' directory, then:
$ make
# make install
* making debian packages
PS: lembrar de trocar a versão no arquivo debian/compat
Inside the root metaphoneptbr directory (from source), run:
# dpkg-buildpackage -rfakeroot -ICVS -tc -D -uc -us
It should produce some files like those, so far:
../metaphoneptbr_1.3_amd64.changes
../metaphoneptbr_1.3.dsc
../metaphoneptbr_1.3.tar.gz
../metaphoneptbr4pgsql_1.3_amd64.deb
../metaphoneptbr-utils_1.3_amd64.deb
../php5-metaphoneptbr_1.3_amd64.deb