Skip to content
This repository
Browse code

Support FreeBSD packaging

  • Loading branch information...
commit 176bb0f6a1fe2d65b20aea09842ebda6d51a030f 1 parent 698551d
Jared Morrow authored May 23, 2012
2  Makefile
@@ -208,7 +208,7 @@ PKG_VERSION = $(shell echo $(DISTNAME) | sed -e 's/^$(REPO)-//')
208 208
 package: dist
209 209
 	$(MAKE) -C package package
210 210
 
211  
-pkgclean:
  211
+pkgclean: distclean
212 212
 	$(MAKE) -C package pkgclean
213 213
 
214 214
 .PHONY: package
12  package/Makefile
@@ -6,17 +6,14 @@ ARCH		= $(shell uname -m)
6 6
 PKGER		= $(shell cat /etc/redhat-release 2> /dev/null)
7 7
 ifeq ($(PKGER),)
8 8
 OSNAME		= Debian
9  
-PKGER		= debuild
10 9
 PKGERDIR	= deb
11 10
 else
12 11
 OSNAME		= RedHat
13  
-PKGER		= rpmbuild
14 12
 PKGERDIR	= rpm
15 13
 endif
16 14
 endif
17 15
 ifeq ($(OS),SunOS)
18 16
 ARCH		= $(shell uname -p)
19  
-PKGER		= make
20 17
 PKGERDIR	= solaris
21 18
 DISTRO		= $(shell head -1 /etc/release|awk \
22 19
                    '{if ($$1 == "OmniOS") {print $$1} else {print "Solaris"}}')
@@ -25,10 +22,15 @@ endif
25 22
 ifeq ($(OS),Darwin)
26 23
 OSNAME		= OSX
27 24
 ARCH		= $(shell uname -m)
28  
-PKGER		= make
29 25
 PKGERDIR	= osx
30 26
 BUILDDIR	= osxbuild
31 27
 endif
  28
+ifeq ($(OS),FreeBSD)
  29
+OSNAME          = $(OS)
  30
+ARCH            = $(shell uname -p)
  31
+PKGERDIR        = freebsd
  32
+BUILDDIR        = bsdbuild
  33
+endif
32 34
 
33 35
 DATE		= $(shell date +%Y-%m-%d)
34 36
 VERSIONSTRING	= $(APP) ($(PKG_VERSION) $(DATE)) $(OSNAME) $(ARCH)
@@ -42,7 +44,7 @@ $(APP)-$(PKG_VERSION).tar.gz: ../$(DISTNAME).tar.gz
42 44
 	ln -s $< $@
43 45
 
44 46
 pkgclean: $(PKGERDIR)/pkgclean
45  
-	rm -rf $(APP)-$(PKG_VERSION).tar.gz working rpmbuild debuild packages osxbuild
  47
+	rm -rf $(APP)-*.tar.gz working rpmbuild debuild packages osxbuild bsdbuild
46 48
 
47 49
 pkgcheck:
48 50
 	$(if $(DISTNAME),,$(error "You can't generate a release tarball from a non-tagged revision. Run 'git checkout <tag>', then 'make dist'"))
1  package/freebsd/+COMMENT
... ...
@@ -0,0 +1 @@
  1
+Riak highly scalable, fault-tolerant distributed database
13  package/freebsd/+DEINSTALL
... ...
@@ -0,0 +1,13 @@
  1
+#!/bin/sh
  2
+
  3
+if [ "$2" != "POST-DEINSTALL" ]; then
  4
+    exit 0
  5
+fi
  6
+
  7
+USER=riak
  8
+
  9
+if pw usershow "${USER}" 2>/dev/null 1>&2; then
  10
+        echo "To delete riak user permanently, use 'pw userdel ${USER}'"
  11
+fi
  12
+
  13
+exit 0
3  package/freebsd/+DESC
... ...
@@ -0,0 +1,3 @@
  1
+Riak is an open source, highly scalable, fault-tolerant distributed database.
  2
+
  3
+WWW: http://basho.com/products/riak-overview/
17  package/freebsd/+DISPLAY
... ...
@@ -0,0 +1,17 @@
  1
+Thank you for installing Riak.
  2
+
  3
+Riak has been installed in /usr/local/riak owned by user:group riak:riak
  4
+
  5
+The primary directories are:
  6
+
  7
+    {platform_bin_dir, "/usr/local/riak/bin"}
  8
+    {platform_data_dir, "/usr/local/riak/data"}
  9
+    {platform_etc_dir, "/usr/local/riak/etc"}
  10
+    {platform_lib_dir, "/usr/local/riak/lib"}
  11
+    {platform_log_dir, "/usr/local/riak/log"}
  12
+
  13
+These can be configured and changed in the platform_etc_dir/app.config.
  14
+
  15
+Add /usr/local/riak/bin to your path to run the riak, riak-admin, and search-cmd 
  16
+scripts directly.
  17
+
25  package/freebsd/+INSTALL
... ...
@@ -0,0 +1,25 @@
  1
+#!/bin/sh
  2
+
  3
+if [ "$2" != "PRE-INSTALL" ]; then
  4
+    exit 0
  5
+fi
  6
+
  7
+if ! pw groupshow riak >/dev/null; then
  8
+	if pw groupadd riak; then
  9
+		echo "Added group riak"
  10
+	else
  11
+		echo "Failed to add group riak" >&2
  12
+		exit 1
  13
+	fi
  14
+fi
  15
+
  16
+if ! pw usershow riak >/dev/null; then
  17
+	if pw useradd riak -g riak -h - -d /usr/local/riak -s bash -c "RIak Server"; then
  18
+		echo "Added user riak"
  19
+	else
  20
+		echo "Failed to add user riak" >&2
  21
+		exit 1
  22
+	fi
  23
+fi
  24
+
  25
+#eof
956  package/freebsd/+MTREE_DIRS
... ...
@@ -0,0 +1,956 @@
  1
+# $FreeBSD: ports/Templates/BSD.local.dist,v 1.3 2010/11/12 20:57:14 pav Exp $
  2
+#
  3
+# Please see the file src/etc/mtree/README before making changes to this file.
  4
+#
  5
+
  6
+/set type=dir uname=root gname=wheel mode=0755
  7
+.
  8
+    bin
  9
+    ..
  10
+    etc
  11
+        devd
  12
+        ..
  13
+        man.d
  14
+        ..
  15
+        pam.d
  16
+        ..
  17
+        rc.d
  18
+        ..
  19
+    ..
  20
+    include
  21
+        X11
  22
+        ..
  23
+    ..
  24
+    info
  25
+    ..
  26
+    lib
  27
+        X11
  28
+            app-defaults
  29
+            ..
  30
+            fonts
  31
+                local
  32
+                ..
  33
+            ..
  34
+        ..
  35
+    ..
  36
+    libdata
  37
+        ldconfig
  38
+        ..
  39
+        ldconfig32
  40
+        ..
  41
+        pkgconfig
  42
+        ..
  43
+    ..
  44
+    libexec
  45
+    ..
  46
+    man
  47
+/set uname=man
  48
+        cat1
  49
+        ..
  50
+        cat2
  51
+        ..
  52
+        cat3
  53
+        ..
  54
+        cat4
  55
+        ..
  56
+        cat5
  57
+        ..
  58
+        cat6
  59
+        ..
  60
+        cat7
  61
+        ..
  62
+        cat8
  63
+        ..
  64
+        cat9
  65
+        ..
  66
+        catl
  67
+        ..
  68
+        catn
  69
+        ..
  70
+        de.ISO8859-1    uname=root
  71
+            cat1
  72
+            ..
  73
+            cat2
  74
+            ..
  75
+            cat3
  76
+            ..
  77
+            cat4
  78
+            ..
  79
+            cat5
  80
+            ..
  81
+            cat6
  82
+            ..
  83
+            cat7
  84
+            ..
  85
+            cat8
  86
+            ..
  87
+            cat9
  88
+            ..
  89
+            catl
  90
+            ..
  91
+            catn
  92
+            ..
  93
+/set uname=root
  94
+            man1
  95
+            ..
  96
+            man2
  97
+            ..
  98
+            man3
  99
+            ..
  100
+            man4
  101
+            ..
  102
+            man5
  103
+            ..
  104
+            man6
  105
+            ..
  106
+            man7
  107
+            ..
  108
+            man8
  109
+            ..
  110
+            man9
  111
+            ..
  112
+            manl
  113
+            ..
  114
+            mann
  115
+            ..
  116
+        ..
  117
+        en.ISO8859-1
  118
+/set uname=man
  119
+            cat1
  120
+            ..
  121
+            cat1aout
  122
+            ..
  123
+            cat2
  124
+            ..
  125
+            cat3
  126
+            ..
  127
+            cat4
  128
+                i386
  129
+                ..
  130
+            ..
  131
+            cat5
  132
+            ..
  133
+            cat6
  134
+            ..
  135
+            cat7
  136
+            ..
  137
+            cat8
  138
+                i386
  139
+                ..
  140
+            ..
  141
+            cat9
  142
+                i386
  143
+                ..
  144
+            ..
  145
+            catn
  146
+            ..
  147
+        ..
  148
+        ja              uname=root
  149
+            cat1
  150
+            ..
  151
+            cat2
  152
+            ..
  153
+            cat3
  154
+            ..
  155
+            cat4
  156
+            ..
  157
+            cat5
  158
+            ..
  159
+            cat6
  160
+            ..
  161
+            cat7
  162
+            ..
  163
+            cat8
  164
+            ..
  165
+            cat9
  166
+            ..
  167
+            catl
  168
+            ..
  169
+            catn
  170
+            ..
  171
+/set uname=root
  172
+            man1
  173
+            ..
  174
+            man2
  175
+            ..
  176
+            man3
  177
+            ..
  178
+            man4
  179
+            ..
  180
+            man5
  181
+            ..
  182
+            man6
  183
+            ..
  184
+            man7
  185
+            ..
  186
+            man8
  187
+            ..
  188
+            man9
  189
+            ..
  190
+            manl
  191
+            ..
  192
+            mann
  193
+            ..
  194
+        ..
  195
+        man1
  196
+        ..
  197
+        man2
  198
+        ..
  199
+        man3
  200
+        ..
  201
+        man4
  202
+        ..
  203
+        man5
  204
+        ..
  205
+        man6
  206
+        ..
  207
+        man7
  208
+        ..
  209
+        man8
  210
+        ..
  211
+        man9
  212
+        ..
  213
+        manl
  214
+        ..
  215
+        mann
  216
+        ..
  217
+        ru.KOI8-R
  218
+/set uname=man
  219
+            cat1
  220
+            ..
  221
+            cat2
  222
+            ..
  223
+            cat3
  224
+            ..
  225
+            cat4
  226
+            ..
  227
+            cat5
  228
+            ..
  229
+            cat6
  230
+            ..
  231
+            cat7
  232
+            ..
  233
+            cat8
  234
+            ..
  235
+            cat9
  236
+            ..
  237
+            catl
  238
+            ..
  239
+            catn
  240
+            ..
  241
+/set uname=root
  242
+            man1
  243
+            ..
  244
+            man2
  245
+            ..
  246
+            man3
  247
+            ..
  248
+            man4
  249
+            ..
  250
+            man5
  251
+            ..
  252
+            man6
  253
+            ..
  254
+            man7
  255
+            ..
  256
+            man8
  257
+            ..
  258
+            man9
  259
+            ..
  260
+            manl
  261
+            ..
  262
+            mann
  263
+            ..
  264
+        ..
  265
+    ..
  266
+    sbin
  267
+    ..
  268
+    share
  269
+        aclocal
  270
+        ..
  271
+        dict
  272
+        ..
  273
+        doc
  274
+            ja
  275
+            ..
  276
+        ..
  277
+        emacs
  278
+            site-lisp
  279
+            ..
  280
+        ..
  281
+        examples
  282
+        ..
  283
+        java
  284
+            classes
  285
+            ..
  286
+        ..
  287
+        locale
  288
+            af
  289
+                LC_MESSAGES
  290
+                ..
  291
+            ..
  292
+            am
  293
+                LC_MESSAGES
  294
+                ..
  295
+            ..
  296
+            ar
  297
+                LC_MESSAGES
  298
+                ..
  299
+            ..
  300
+            az
  301
+                LC_MESSAGES
  302
+                ..
  303
+            ..
  304
+            be
  305
+                LC_MESSAGES
  306
+                ..
  307
+            ..
  308
+            bg
  309
+                LC_MESSAGES
  310
+                ..
  311
+            ..
  312
+            bn
  313
+                LC_MESSAGES
  314
+                ..
  315
+            ..
  316
+            br
  317
+                LC_MESSAGES
  318
+                ..
  319
+            ..
  320
+            bs
  321
+                LC_MESSAGES
  322
+                ..
  323
+            ..
  324
+            ca
  325
+                LC_MESSAGES
  326
+                ..
  327
+            ..
  328
+            cs
  329
+                LC_MESSAGES
  330
+                ..
  331
+            ..
  332
+            cy
  333
+                LC_MESSAGES
  334
+                ..
  335
+            ..
  336
+            da
  337
+                LC_MESSAGES
  338
+                ..
  339
+            ..
  340
+            de
  341
+                LC_MESSAGES
  342
+                ..
  343
+            ..
  344
+            de_AT
  345
+                LC_MESSAGES
  346
+                ..
  347
+            ..
  348
+            dk
  349
+                LC_MESSAGES
  350
+                ..
  351
+            ..
  352
+            ee
  353
+                LC_MESSAGES
  354
+                ..
  355
+            ..
  356
+            el
  357
+                LC_MESSAGES
  358
+                ..
  359
+            ..
  360
+            en
  361
+                LC_MESSAGES
  362
+                ..
  363
+            ..
  364
+            en_AU
  365
+                LC_MESSAGES
  366
+                ..
  367
+            ..
  368
+            en_CA
  369
+                LC_MESSAGES
  370
+                ..
  371
+            ..
  372
+            en_GB
  373
+                LC_MESSAGES
  374
+                ..
  375
+            ..
  376
+            eo
  377
+                LC_MESSAGES
  378
+                ..
  379
+            ..
  380
+            es
  381
+                LC_MESSAGES
  382
+                ..
  383
+            ..
  384
+            es_ES
  385
+                LC_MESSAGES
  386
+                ..
  387
+            ..
  388
+            es_MX
  389
+                LC_MESSAGES
  390
+                ..
  391
+            ..
  392
+            et
  393
+                LC_MESSAGES
  394
+                ..
  395
+            ..
  396
+            eu
  397
+                LC_MESSAGES
  398
+                ..
  399
+            ..
  400
+            fa
  401
+                LC_MESSAGES
  402
+                ..
  403
+            ..
  404
+            fa_IR
  405
+                LC_MESSAGES
  406
+                ..
  407
+            ..
  408
+            fi
  409
+                LC_MESSAGES
  410
+                ..
  411
+            ..
  412
+            fr
  413
+                LC_MESSAGES
  414
+                ..
  415
+            ..
  416
+            fr_FR
  417
+                LC_MESSAGES
  418
+                ..
  419
+            ..
  420
+            ga
  421
+                LC_MESSAGES
  422
+                ..
  423
+            ..
  424
+            gl
  425
+                LC_MESSAGES
  426
+                ..
  427
+            ..
  428
+            gu
  429
+                LC_MESSAGES
  430
+                ..
  431
+            ..
  432
+            he
  433
+                LC_MESSAGES
  434
+                ..
  435
+            ..
  436
+            hi
  437
+                LC_MESSAGES
  438
+                ..
  439
+            ..
  440
+            hr
  441
+                LC_MESSAGES
  442
+                ..
  443
+            ..
  444
+            hu
  445
+                LC_MESSAGES
  446
+                ..
  447
+            ..
  448
+            id
  449
+                LC_MESSAGES
  450
+                ..
  451
+            ..
  452
+            is
  453
+                LC_MESSAGES
  454
+                ..
  455
+            ..
  456
+            it
  457
+                LC_MESSAGES
  458
+                ..
  459
+            ..
  460
+            ja
  461
+                LC_MESSAGES
  462
+                ..
  463
+            ..
  464
+            ka
  465
+                LC_MESSAGES
  466
+                ..
  467
+            ..
  468
+            kn
  469
+                LC_MESSAGES
  470
+                ..
  471
+            ..
  472
+            ko
  473
+                LC_MESSAGES
  474
+                ..
  475
+            ..
  476
+            li
  477
+                LC_MESSAGES
  478
+                ..
  479
+            ..
  480
+            lt
  481
+                LC_MESSAGES
  482
+                ..
  483
+            ..
  484
+            lv
  485
+                LC_MESSAGES
  486
+                ..
  487
+            ..
  488
+            mk
  489
+                LC_MESSAGES
  490
+                ..
  491
+            ..
  492
+            ml
  493
+                LC_MESSAGES
  494
+                ..
  495
+            ..
  496
+            mn
  497
+                LC_MESSAGES
  498
+                ..
  499
+            ..
  500
+            ms
  501
+                LC_MESSAGES
  502
+                ..
  503
+            ..
  504
+            mt
  505
+                LC_MESSAGES
  506
+                ..
  507
+            ..
  508
+            nb
  509
+                LC_MESSAGES
  510
+                ..
  511
+            ..
  512
+            ne
  513
+                LC_MESSAGES
  514
+                ..
  515
+            ..
  516
+            nl
  517
+                LC_MESSAGES
  518
+                ..
  519
+            ..
  520
+            nn
  521
+                LC_MESSAGES
  522
+                ..
  523
+            ..
  524
+            no
  525
+                LC_MESSAGES
  526
+                ..
  527
+            ..
  528
+            or
  529
+                LC_MESSAGES
  530
+                ..
  531
+            ..
  532
+            pa
  533
+                LC_MESSAGES
  534
+                ..
  535
+            ..
  536
+            pl
  537
+                LC_MESSAGES
  538
+                ..
  539
+            ..
  540
+            pt
  541
+                LC_MESSAGES
  542
+                ..
  543
+            ..
  544
+            pt_BR
  545
+                LC_MESSAGES
  546
+                ..
  547
+            ..
  548
+            pt_PT
  549
+                LC_MESSAGES
  550
+                ..
  551
+            ..
  552
+            ro
  553
+                LC_MESSAGES
  554
+                ..
  555
+            ..
  556
+            ru
  557
+                LC_MESSAGES
  558
+                ..
  559
+            ..
  560
+            sk
  561
+                LC_MESSAGES
  562
+                ..
  563
+            ..
  564
+            sl
  565
+                LC_MESSAGES
  566
+                ..
  567
+            ..
  568
+            sq
  569
+                LC_MESSAGES
  570
+                ..
  571
+            ..
  572
+            sr
  573
+                LC_MESSAGES
  574
+                ..
  575
+            ..
  576
+            sr@Latn
  577
+                LC_MESSAGES
  578
+                ..
  579
+            ..
  580
+            sv
  581
+                LC_MESSAGES
  582
+                ..
  583
+            ..
  584
+            ta
  585
+                LC_MESSAGES
  586
+                ..
  587
+            ..
  588
+            tg
  589
+                LC_MESSAGES
  590
+                ..
  591
+            ..
  592
+            th
  593
+                LC_MESSAGES
  594
+                ..
  595
+            ..
  596
+            tk
  597
+                LC_MESSAGES
  598
+                ..
  599
+            ..
  600
+            tr
  601
+                LC_MESSAGES
  602
+                ..
  603
+            ..
  604
+            uk
  605
+                LC_MESSAGES
  606
+                ..
  607
+            ..
  608
+            uz
  609
+                LC_MESSAGES
  610
+                ..
  611
+            ..
  612
+            vi
  613
+                LC_MESSAGES
  614
+                ..
  615
+            ..
  616
+            wa
  617
+                LC_MESSAGES
  618
+                ..
  619
+            ..
  620
+            zh
  621
+                LC_MESSAGES
  622
+                ..
  623
+            ..
  624
+            zh_CN
  625
+                LC_MESSAGES
  626
+                ..
  627
+            ..
  628
+            zh_CN.GB2312
  629
+                LC_MESSAGES
  630
+                ..
  631
+            ..
  632
+            zh_TW
  633
+                LC_MESSAGES
  634
+                ..
  635
+            ..
  636
+            zh_TW.Big5
  637
+                LC_MESSAGES
  638
+                ..
  639
+            ..
  640
+        ..
  641
+        misc
  642
+        ..
  643
+        nls
  644
+            C
  645
+            ..
  646
+            af_ZA.ISO8859-1
  647
+            ..
  648
+            af_ZA.ISO8859-15
  649
+            ..
  650
+            af_ZA.UTF-8
  651
+            ..
  652
+            am_ET.UTF-8
  653
+            ..
  654
+            be_BY.CP1131
  655
+            ..
  656
+            be_BY.CP1251
  657
+            ..
  658
+            be_BY.ISO8859-5
  659
+            ..
  660
+            be_BY.UTF-8
  661
+            ..
  662
+            bg_BG.CP1251
  663
+            ..
  664
+            bg_BG.UTF-8
  665
+            ..
  666
+            ca_ES.ISO8859-1
  667
+            ..
  668
+            ca_ES.ISO8859-15
  669
+            ..
  670
+            ca_ES.UTF-8
  671
+            ..
  672
+            cs_CZ.ISO8859-2
  673
+            ..
  674
+            cs_CZ.UTF-8
  675
+            ..
  676
+            da_DK.ISO8859-1
  677
+            ..
  678
+            da_DK.ISO8859-15
  679
+            ..
  680
+            da_DK.UTF-8
  681
+            ..
  682
+            de_AT.ISO8859-1
  683
+            ..
  684
+            de_AT.ISO8859-15
  685
+            ..
  686
+            de_AT.UTF-8
  687
+            ..
  688
+            de_CH.ISO8859-1
  689
+            ..
  690
+            de_CH.ISO8859-15
  691
+            ..
  692
+            de_CH.UTF-8
  693
+            ..
  694
+            de_DE.ISO8859-1
  695
+            ..
  696
+            de_DE.ISO8859-15
  697
+            ..
  698
+            de_DE.UTF-8
  699
+            ..
  700
+            el_GR.ISO8859-7
  701
+            ..
  702
+            el_GR.UTF-8
  703
+            ..
  704
+            en_AU.ISO8859-1
  705
+            ..
  706
+            en_AU.ISO8859-15
  707
+            ..
  708
+            en_AU.US-ASCII
  709
+            ..
  710
+            en_AU.UTF-8
  711
+            ..
  712
+            en_CA.ISO8859-1
  713
+            ..
  714
+            en_CA.ISO8859-15
  715
+            ..
  716
+            en_CA.US-ASCII
  717
+            ..
  718
+            en_CA.UTF-8
  719
+            ..
  720
+            en_GB.ISO8859-1
  721
+            ..
  722
+            en_GB.ISO8859-15
  723
+            ..
  724
+            en_GB.US-ASCII
  725
+            ..
  726
+            en_GB.UTF-8
  727
+            ..
  728
+            en_IE.UTF-8
  729
+            ..
  730
+            en_NZ.ISO8859-1
  731
+            ..
  732
+            en_NZ.ISO8859-15
  733
+            ..
  734
+            en_NZ.US-ASCII
  735
+            ..
  736
+            en_NZ.UTF-8
  737
+            ..
  738
+            en_US.ISO8859-1
  739
+            ..
  740
+            en_US.ISO8859-15
  741
+            ..
  742
+            en_US.UTF-8
  743
+            ..
  744
+            es_ES.ISO8859-1
  745
+            ..
  746
+            es_ES.ISO8859-15
  747
+            ..
  748
+            es_ES.UTF-8
  749
+            ..
  750
+            et_EE.ISO8859-15
  751
+            ..
  752
+            et_EE.UTF-8
  753
+            ..
  754
+            fi_FI.ISO8859-1
  755
+            ..
  756
+            fi_FI.ISO8859-15
  757
+            ..
  758
+            fi_FI.UTF-8
  759
+            ..
  760
+            fr_BE.ISO8859-1
  761
+            ..
  762
+            fr_BE.ISO8859-15
  763
+            ..
  764
+            fr_BE.UTF-8
  765
+            ..
  766
+            fr_CA.ISO8859-1
  767
+            ..
  768
+            fr_CA.ISO8859-15
  769
+            ..
  770
+            fr_CA.UTF-8
  771
+            ..
  772
+            fr_CH.ISO8859-1
  773
+            ..
  774
+            fr_CH.ISO8859-15
  775
+            ..
  776
+            fr_CH.UTF-8
  777
+            ..
  778
+            fr_FR.ISO8859-1
  779
+            ..
  780
+            fr_FR.ISO8859-15
  781
+            ..
  782
+            fr_FR.UTF-8
  783
+            ..
  784
+            he_IL.UTF-8
  785
+            ..
  786
+            hi_IN.ISCII-DEV
  787
+            ..
  788
+            hr_HR.ISO8859-2
  789
+            ..
  790
+            hr_HR.UTF-8
  791
+            ..
  792
+            hu_HU.ISO8859-2
  793
+            ..
  794
+            hu_HU.UTF-8
  795
+            ..
  796
+            hy_AM.ARMSCII-8
  797
+            ..
  798
+            hy_AM.UTF-8
  799
+            ..
  800
+            is_IS.ISO8859-1
  801
+            ..
  802
+            is_IS.ISO8859-15
  803
+            ..
  804
+            is_IS.UTF-8
  805
+            ..
  806
+            it_CH.ISO8859-1
  807
+            ..
  808
+            it_CH.ISO8859-15
  809
+            ..
  810
+            it_CH.UTF-8
  811
+            ..
  812
+            it_IT.ISO8859-1
  813
+            ..
  814
+            it_IT.ISO8859-15
  815
+            ..
  816
+            it_IT.UTF-8
  817
+            ..
  818
+            ja_JP.SJIS
  819
+            ..
  820
+            ja_JP.UTF-8
  821
+            ..
  822
+            ja_JP.eucJP
  823
+            ..
  824
+            kk_KZ.PT154
  825
+            ..
  826
+            kk_KZ.UTF-8
  827
+            ..
  828
+            ko_KR.CP949
  829
+            ..
  830
+            ko_KR.UTF-8
  831
+            ..
  832
+            ko_KR.eucKR
  833
+            ..
  834
+            la_LN.ISO8859-1
  835
+            ..
  836
+            la_LN.ISO8859-15
  837
+            ..
  838
+            la_LN.ISO8859-2
  839
+            ..
  840
+            la_LN.ISO8859-4
  841
+            ..
  842
+            la_LN.US-ASCII
  843
+            ..
  844
+            lt_LT.ISO8859-13
  845
+            ..
  846
+            lt_LT.ISO8859-4
  847
+            ..
  848
+            lt_LT.UTF-8
  849
+            ..
  850
+            nl_BE.ISO8859-1
  851
+            ..
  852
+            nl_BE.ISO8859-15
  853
+            ..
  854
+            nl_BE.UTF-8
  855
+            ..
  856
+            nl_NL.ISO8859-1
  857
+            ..
  858
+            nl_NL.ISO8859-15
  859
+            ..
  860
+            nl_NL.UTF-8
  861
+            ..
  862
+            no_NO.ISO8859-1
  863
+            ..
  864
+            no_NO.ISO8859-15
  865
+            ..
  866
+            no_NO.UTF-8
  867
+            ..
  868
+            pl_PL.ISO8859-2
  869
+            ..
  870
+            pl_PL.UTF-8
  871
+            ..
  872
+            pt_BR.ISO8859-1
  873
+            ..
  874
+            pt_BR.UTF-8
  875
+            ..
  876
+            pt_PT.ISO8859-1
  877
+            ..
  878
+            pt_PT.ISO8859-15
  879
+            ..
  880
+            pt_PT.UTF-8
  881
+            ..
  882
+            ro_RO.ISO8859-2
  883
+            ..
  884
+            ro_RO.UTF-8
  885
+            ..
  886
+            ru_RU.CP1251
  887
+            ..
  888
+            ru_RU.CP866
  889
+            ..
  890
+            ru_RU.ISO8859-5
  891
+            ..
  892
+            ru_RU.KOI8-R
  893
+            ..
  894
+            ru_RU.UTF-8
  895
+            ..
  896
+            sk_SK.ISO8859-2
  897
+            ..
  898
+            sk_SK.UTF-8
  899
+            ..
  900
+            sl_SI.ISO8859-2
  901
+            ..
  902
+            sl_SI.UTF-8
  903
+            ..
  904
+            sr_YU.ISO8859-2
  905
+            ..
  906
+            sr_YU.ISO8859-5
  907
+            ..
  908
+            sr_YU.UTF-8
  909
+            ..
  910
+            sv_SE.ISO8859-1
  911
+            ..
  912
+            sv_SE.ISO8859-15
  913
+            ..
  914
+            sv_SE.UTF-8
  915
+            ..
  916
+            tr_TR.ISO8859-9
  917
+            ..
  918
+            tr_TR.UTF-8
  919
+            ..
  920
+            uk_UA.ISO8859-5
  921
+            ..
  922
+            uk_UA.KOI8-U
  923
+            ..
  924
+            uk_UA.UTF-8
  925
+            ..
  926
+            zh_CN.GB18030
  927
+            ..
  928
+            zh_CN.GB2312
  929
+            ..
  930
+            zh_CN.GBK
  931
+            ..
  932
+            zh_CN.UTF-8
  933
+            ..
  934
+            zh_CN.eucCN
  935
+            ..
  936
+            zh_HK.Big5HKSCS
  937
+            ..
  938
+            zh_HK.UTF-8
  939
+            ..
  940
+            zh_TW.Big5
  941
+            ..
  942
+            zh_TW.UTF-8
  943
+            ..
  944
+        ..
  945
+        pixmaps
  946
+        ..
  947
+        sgml
  948
+        ..
  949
+        skel
  950
+        ..
  951
+        xml
  952
+        ..
  953
+    ..
  954
+    www
  955
+    ..
  956
+..
72  package/freebsd/Makefile
... ...
@@ -0,0 +1,72 @@
  1
+BUILD_RIAK_PATH = $(BUILDDIR)/$(APP)-$(PKG_VERSION)
  2
+BUILD_STAGE_DIR = $(BUILDDIR)/$(APP)
  3
+PKGNAME = $(APP)-$(PKG_VERSION)-$(OSNAME)-$(ARCH).tbz
  4
+
  5
+build: packing_list templates
  6
+	@echo "Building package $(PKGNAME)"
  7
+	mkdir -p packages
  8
+	cd $(BUILD_STAGE_DIR) && \
  9
+	tar -cjf ../../packages/$(PKGNAME) *
  10
+	cd packages && \
  11
+		for tarfile in `ls *.tbz`; do \
  12
+		shasum -a 256 $${tarfile} > $${tarfile}.sha \
  13
+	; done
  14
+
  15
+# Where most of the magic happens
  16
+# Create a packing list according to pkg_create(1)
  17
+# Write initial settings to a local file then copy
  18
+#   to the destination folder where we use 'find'
  19
+#   to populate the files and directories
  20
+packing_list: $(BUILD_STAGE_DIR)
  21
+	@echo "Adding to packaging list $(APP)-$(PKG_VERSION)"
  22
+	echo "@name $(APP)-$(PKG_VERSION)" >> plist
  23
+	echo "@cwd /usr/local" >> plist
  24
+	echo "@conflicts riak-*" >> plist
  25
+	echo "@exec if ! pw groupshow riak 2>/dev/null; then pw groupadd riak; fi" >> plist
  26
+	echo "@exec if ! pw usershow riak 2>/dev/null; then pw useradd riak -g riak -h - -d /usr/local/riak -s /bin/sh -c \"Riak Server\"; fi" >> plist
  27
+	echo "@owner riak" >> plist
  28
+	echo "@group riak" >> plist
  29
+	mv plist $(BUILD_STAGE_DIR)/+CONTENTS
  30
+	cd $(BUILD_STAGE_DIR) && \
  31
+           find riak -type f >> +CONTENTS
  32
+	cd $(BUILD_STAGE_DIR) && \
  33
+	   find riak -type d -exec echo "@dirrm {}" \; >> +CONTENTS
  34
+	cd $(BUILD_STAGE_DIR) && \
  35
+	   echo "@exec chown -R riak:riak /usr/local/riak" >> +CONTENTS
  36
+	cd $(BUILD_STAGE_DIR) && \
  37
+	   echo "@display +DISPLAY" >> +CONTENTS
  38
+
  39
+templates: $(BUILD_STAGE_DIR)
  40
+	@echo "Copying metadata files to package"
  41
+	cp $(PKGERDIR)/+DESC $(PKGERDIR)/+COMMENT $(PKGERDIR)/+DEINSTALL \
  42
+           $(PKGERDIR)/+MTREE_DIRS $(PKGERDIR)/+DISPLAY \
  43
+           $(BUILD_STAGE_DIR)
  44
+
  45
+# Copy the app rel directory to the staging directory to build our 
  46
+# package structure
  47
+$(BUILD_STAGE_DIR): buildrel
  48
+	@echo "Copying rel directory to staging directory"
  49
+	mkdir -p $@
  50
+	cp -r $(BUILD_RIAK_PATH)/rel/riak $(BUILD_STAGE_DIR)
  51
+
  52
+# Build the release we need to package
  53
+#  Also ensure all binaries are executable
  54
+#  and copy the vars.config over for build config
  55
+buildrel: $(BUILD_RIAK_PATH)
  56
+	cp $(BUILD_RIAK_PATH)/rel/files/riak $(BUILD_RIAK_PATH)/rel/files/riak.tmp
  57
+	sed -e "s/^RIAK_VERSION.*$$/RIAK_VERSION=\"${VERSIONSTRING}\"/" < \
  58
+	       $(BUILD_RIAK_PATH)/rel/files/riak.tmp > $(BUILD_RIAK_PATH)/rel/files/riak
  59
+	cp -f $(PKGERDIR)/vars.config $(BUILD_RIAK_PATH)/rel/vars.config
  60
+	$(MAKE) -C $(BUILD_RIAK_PATH) deps rel
  61
+	chmod 0755 $(BUILD_RIAK_PATH)/rel/riak/bin/* $(BUILD_RIAK_PATH)/rel/riak/erts-*/bin/*
  62
+
  63
+
  64
+
  65
+$(BUILD_RIAK_PATH): $(BUILDDIR) $(APP)-$(PKG_VERSION).tar.gz
  66
+	tar xz -C $(BUILDDIR) -f $(APP)-$(PKG_VERSION).tar.gz
  67
+
  68
+$(BUILDDIR):
  69
+	mkdir -p $@
  70
+
  71
+$(PKGERDIR)/pkgclean:
  72
+	rm -rf $(BUILD_STAGE_DIR) $(BUILDDIR)
51  package/freebsd/vars.config
... ...
@@ -0,0 +1,51 @@
  1
+%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
  2
+%% ex: ft=erlang ts=4 sw=4 et
  3
+
  4
+% Platform-specific installation paths
  5
+{platform_bin_dir,  "/usr/local/riak/bin"}.
  6
+{platform_data_dir, "/usr/local/riak/data"}.
  7
+{platform_etc_dir,  "/usr/local/riak/etc"}.
  8
+{platform_lib_dir,  "/usr/local/riak/lib"}.
  9
+{platform_log_dir,  "/usr/local/riak/log"}.
  10
+
  11
+%%
  12
+%% etc/app.config
  13
+%%
  14
+{web_ip,            "127.0.0.1"}.
  15
+{web_port,          8098}.
  16
+{handoff_port,      8099}.
  17
+{pb_ip,             "127.0.0.1"}.
  18
+{pb_port,           8087}.
  19
+{ring_state_dir,    "{{platform_data_dir}}/ring"}.
  20
+{bitcask_data_root, "{{platform_data_dir}}/bitcask"}.
  21
+{leveldb_data_root, "{{platform_data_dir}}/leveldb"}.
  22
+{sasl_error_log,    "{{platform_log_dir}}/sasl-error.log"}.
  23
+{sasl_log_dir,      "{{platform_log_dir}}/sasl"}.
  24
+{mapred_queue_dir,  "{{platform_data_dir}}/mr_queue"}.
  25
+
  26
+%% riak_search
  27
+{merge_index_data_root,  "{{platform_data_dir}}/merge_index"}.
  28
+
  29
+%% secondary indices
  30
+{merge_index_data_root_2i,  "{{platform_data_dir}}/merge_index_2i"}.