initial checkin
authorMichael Wallner <mike@php.net>
Sat, 26 Sep 2015 22:14:28 +0000 (00:14 +0200)
committerMichael Wallner <mike@php.net>
Sat, 26 Sep 2015 22:14:28 +0000 (00:14 +0200)
15 files changed:
.editorconfig [new file with mode: 0644]
.gitignore [new file with mode: 0644]
AUTHORS [new file with mode: 0644]
CONTRIBUTING.md [new file with mode: 0644]
LICENSE [new file with mode: 0644]
README.md [new file with mode: 0644]
THANKS [new file with mode: 0644]
init [new file with mode: 0755]
presets/.editorconfig [new file with mode: 0644]
presets/AUTHORS [new file with mode: 0644]
presets/CONTRIBUTING.md [new file with mode: 0644]
presets/LICENSE [new file with mode: 0644]
presets/README.md [new file with mode: 0644]
presets/THANKS [new file with mode: 0644]
presets/composer.json [new file with mode: 0644]

diff --git a/.editorconfig b/.editorconfig
new file mode 100644 (file)
index 0000000..84c9933
--- /dev/null
@@ -0,0 +1,16 @@
+; see http://editorconfig.org
+root = true
+
+[*]
+end_of_line = lf
+insert_final_newline = true
+indent_style = tab
+charset = utf-8
+trim_trailing_whitespace = true
+
+[*.md]
+trim_trailing_whitespace = false
+
+[*.json]
+indent_style = space
+indent_size = 4
diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..2ec40e5
--- /dev/null
@@ -0,0 +1,3 @@
+tmp
+*.tmp
+*~
diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..67bbd91
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
+Michael Wallner <mike@php.net>
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644 (file)
index 0000000..968bd44
--- /dev/null
@@ -0,0 +1,39 @@
+# Contributor Code of Conduct
+
+As contributors and maintainers of this project, and in the interest of
+fostering an open and welcoming community, we pledge to respect all people who
+contribute through reporting issues, posting feature requests, updating
+documentation, submitting pull requests or patches, and other activities.
+
+We are committed to making participation in this project a harassment-free
+experience for everyone, regardless of level of experience, gender, gender
+identity and expression, sexual orientation, disability, personal appearance,
+body size, race, ethnicity, age, religion, or nationality.
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery
+* Personal attacks
+* Trolling or insulting/derogatory comments
+* Public or private harassment
+* Publishing other's private information, such as physical or electronic
+  addresses, without explicit permission
+* Other unethical or unprofessional conduct.
+
+Project maintainers have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct. By adopting this Code of Conduct, project
+maintainers commit themselves to fairly and consistently applying these
+principles to every aspect of managing this project. Project maintainers who do
+not follow or enforce the Code of Conduct may be permanently removed from the
+project team.
+
+This code of conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community.
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by opening an issue or contacting one or more of the project maintainers.
+
+This Code of Conduct is adapted from the
+[Contributor Covenant](http://contributor-covenant.org), version 1.2.0,
+available at http://contributor-covenant.org/version/1/2/0/.
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..34859a1
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2015, Michael Wallner <mike@php.net>.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, 
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright 
+      notice, this list of conditions and the following disclaimer in the 
+      documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..ef90beb
--- /dev/null
+++ b/README.md
@@ -0,0 +1,14 @@
+# repo-template
+
+Boilerplate for my new repos. Eating its own dog food.
+
+## License
+
+repo-template is licensed under the 2-Clause-BSD license, which can be found in
+the accompanying [LICENSE](./LICENSE) file.
+
+## Contributing
+
+All forms of contribution are welcome! Please see the bundled
+[CONTRIBUTING](./CONTRIBUTING.md) note for the general principles followed.
+
diff --git a/THANKS b/THANKS
new file mode 100644 (file)
index 0000000..d0eae43
--- /dev/null
+++ b/THANKS
@@ -0,0 +1 @@
+Thanks go to the following people, who have contributed to this project:
diff --git a/init b/init
new file mode 100755 (executable)
index 0000000..0e63ff0
--- /dev/null
+++ b/init
@@ -0,0 +1,75 @@
+#!/bin/bash
+# - arguments will be exported to env
+# - must called from within the repo root
+
+export REPO=$(basename $(pwd) .git)
+
+while test $# -gt 0
+do
+       export "$1"
+       shift
+done
+
+for FILE in $(ls -a $(dirname -- $0)/presets)
+do
+       SRCFILE=$(dirname -- $0)/presets/$FILE
+       case $FILE in
+       .|..)
+               continue
+               ;;
+       composer.json)
+               test "${COMPOSER+set}" = "" && continue
+               SRCFILE=$(mktemp -t $RANDOM)
+               php -d variables_order=E $(dirname -- $0)/presets/composer.json >$SRCFILE
+               ;;
+       README.md)
+               SRCFILE=$(mktemp -t $RANDOM)
+               php -d variables_order=E $(dirname -- $0)/presets/README.md >$SRCFILE
+               ;;
+       *)
+               ;;
+       esac
+
+       if test -e $FILE
+       then
+               DIFF="diff -udbBE -- $SRCFILE $FILE"
+               # ignore changes with only additions or removals
+               if  ! $DIFF | awk '{if(NR<4){next}}/^-/{if(p){exit 1}m++}/^\+/{if(m){exit 1}p++}'
+               then
+                       while read -n 1 -p "File $FILE exists and differs (q,s,r,d,v,?) " ACTION
+                       do
+                               echo
+                               case $ACTION in
+                               s)
+                                       break
+                                       ;;
+                               r)
+                                       cp -fv -- $SRCFILE $FILE
+                                       break
+                                       ;;
+                               d)
+                                       $DIFF
+                                       ;;
+                               v)
+                                       vimdiff -- $SRCFILE $FILE
+                                       ;;
+                               q)
+                                       exit
+                                       ;;
+                               *)
+                                       echo "Select what to do now:"
+                                       echo "  (q)uit and exit program now"
+                                       echo "  (s)kip this file an keep the existing"
+                                       echo "  (r)eplace the existing file with the preset"
+                                       echo "  (d)iff the two files -udbBE"
+                                       echo "  (v)imdiff the two files"
+                                       echo "  (?) this help"
+                                       echo
+                                       ;;
+                               esac
+                       done
+               fi
+       else
+               cp -v $SRCFILE $FILE
+       fi
+done
diff --git a/presets/.editorconfig b/presets/.editorconfig
new file mode 100644 (file)
index 0000000..84c9933
--- /dev/null
@@ -0,0 +1,16 @@
+; see http://editorconfig.org
+root = true
+
+[*]
+end_of_line = lf
+insert_final_newline = true
+indent_style = tab
+charset = utf-8
+trim_trailing_whitespace = true
+
+[*.md]
+trim_trailing_whitespace = false
+
+[*.json]
+indent_style = space
+indent_size = 4
diff --git a/presets/AUTHORS b/presets/AUTHORS
new file mode 100644 (file)
index 0000000..67bbd91
--- /dev/null
@@ -0,0 +1 @@
+Michael Wallner <mike@php.net>
diff --git a/presets/CONTRIBUTING.md b/presets/CONTRIBUTING.md
new file mode 100644 (file)
index 0000000..968bd44
--- /dev/null
@@ -0,0 +1,39 @@
+# Contributor Code of Conduct
+
+As contributors and maintainers of this project, and in the interest of
+fostering an open and welcoming community, we pledge to respect all people who
+contribute through reporting issues, posting feature requests, updating
+documentation, submitting pull requests or patches, and other activities.
+
+We are committed to making participation in this project a harassment-free
+experience for everyone, regardless of level of experience, gender, gender
+identity and expression, sexual orientation, disability, personal appearance,
+body size, race, ethnicity, age, religion, or nationality.
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery
+* Personal attacks
+* Trolling or insulting/derogatory comments
+* Public or private harassment
+* Publishing other's private information, such as physical or electronic
+  addresses, without explicit permission
+* Other unethical or unprofessional conduct.
+
+Project maintainers have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct. By adopting this Code of Conduct, project
+maintainers commit themselves to fairly and consistently applying these
+principles to every aspect of managing this project. Project maintainers who do
+not follow or enforce the Code of Conduct may be permanently removed from the
+project team.
+
+This code of conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community.
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by opening an issue or contacting one or more of the project maintainers.
+
+This Code of Conduct is adapted from the
+[Contributor Covenant](http://contributor-covenant.org), version 1.2.0,
+available at http://contributor-covenant.org/version/1/2/0/.
diff --git a/presets/LICENSE b/presets/LICENSE
new file mode 100644 (file)
index 0000000..34859a1
--- /dev/null
@@ -0,0 +1,22 @@
+Copyright (c) 2015, Michael Wallner <mike@php.net>.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, 
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright 
+      notice, this list of conditions and the following disclaimer in the 
+      documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/presets/README.md b/presets/README.md
new file mode 100644 (file)
index 0000000..2e9e980
--- /dev/null
@@ -0,0 +1,87 @@
+<?php extract($_ENV); ?>
+# <?=$REPO?>
+
+
+[![Build Status](https://travis-ci.org/m6w6/<?=$REPO?>.svg?branch=master)](https://travis-ci.org/m6w6/<?=$REPO?>)
+
+...
+
+## Installing
+<?php if (isset($COMPOSER)) : ?>
+
+### Composer
+
+       composer require m6w6/<?=$REPO?>
+
+
+## ChangeLog
+
+A comprehensive list of changes can be obtained from the
+[releases overview](./releases).
+<?php endif; ?>
+<?php if (isset($PECL)) : ?>
+
+### PECL
+
+       pecl install <?=$PECL?>
+
+
+### PHARext
+
+Watch out for [PECL replicates](https://replicator.pharext.org?<?=$PECL?>)
+and pharext packages attached to [releases](./releases).
+
+### Checkout
+
+       git clone github.com:m6w6/<?=$REPO?>
+
+       cd <?=$REPO?>
+
+       /path/to/phpize
+       ./configure --with-php-config=/path/to/php-config
+       make
+       sudo make install
+
+## ChangeLog
+
+A comprehensive list of changes can be obtained from the
+[PECL website](https://pecl.php.net/package-changelog.php?package=<?=$PECL?>).
+<?php endif; ?>
+<?php if (isset($AUTOTOOLS)) : ?>
+
+### Release
+
+       tar xf <?=$REPO?>-*.t*
+       cd <?=$REPO?>-*.t*
+       ./configure
+       make
+       sudo make install
+
+### Checkout
+
+       git clone github.com:m6w6/<?=$REPO?>
+
+       cd <?=$REPO?>
+
+       autoreconf -is
+       ./configure
+       make
+       sudo make install
+
+## ChangeLog
+
+Check out the latest [releases](./releases) or the bundled
+[ChangeLog](./ChangeLog) for a comprehensive list of changes.
+<?php endif; ?>
+
+## License
+
+<?=$REPO?> is licensed under the 2-Clause-BSD license, which can be found in
+the accompanying [LICENSE](./LICENSE) file.
+
+## Contributing
+
+All forms of contribution are welcome! Please see the bundled
+[CONTRIBUTING](./CONTRIBUTING.md) note for the general principles followed.
+
+The list of past and current contributors is maintained in [THANKS](./THANKS).
diff --git a/presets/THANKS b/presets/THANKS
new file mode 100644 (file)
index 0000000..d0eae43
--- /dev/null
@@ -0,0 +1 @@
+Thanks go to the following people, who have contributed to this project:
diff --git a/presets/composer.json b/presets/composer.json
new file mode 100644 (file)
index 0000000..71ba982
--- /dev/null
@@ -0,0 +1,18 @@
+<?php extract($_ENV) ?>
+{
+    "name": "m6w6/<?=$REPO?>",
+    "description": "",
+    "keywords": [],
+    "license": "BSD-2-Clause",
+    "authors": [
+        {
+            "name": "Michael Wallner",
+            "email": "mike@php.net",
+        }
+    ],
+    "autoload": {
+        "psr0": {
+            "<?=$REPO?>\\": "lib/"
+        }
+    }
+}