aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-03-05 15:36:37 -0500
committerB. Stack <bgstack15@gmail.com>2022-03-05 15:36:37 -0500
commit36846794abebbb98bb0d960398ff55c66856c64a (patch)
tree75cbb4fc2795294276bfdd91fad93e2a6889131e
parentinitial commit (diff)
downloadlocale-en_BS-36846794abebbb98bb0d960398ff55c66856c64a.tar.gz
locale-en_BS-36846794abebbb98bb0d960398ff55c66856c64a.tar.bz2
locale-en_BS-36846794abebbb98bb0d960398ff55c66856c64a.zip
add dpkg recipe and readme
-rw-r--r--README.md54
-rw-r--r--debian/README.Debian5
-rw-r--r--debian/changelog5
-rw-r--r--debian/control19
-rw-r--r--debian/copyright26
-rw-r--r--debian/locale-en-bs.dsc14
-rw-r--r--debian/locale-en-bs.install1
-rw-r--r--debian/locale-en-bs.postinst28
-rw-r--r--debian/locale-en-bs.prerm30
-rw-r--r--debian/patches/series1
-rwxr-xr-xdebian/rules9
-rw-r--r--debian/source/format1
-rw-r--r--debian/source/local-options2
-rw-r--r--debian/watch2
-rw-r--r--locale-en_BS.spec5
15 files changed, 200 insertions, 2 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d1b60c8
--- /dev/null
+++ b/README.md
@@ -0,0 +1,54 @@
+# Readme for `locale-en_BS`
+
+## `locale-en_BS` upstream
+This is an original [package](https://gitlab.com/bgstack15/locale-en_BS). It contains merely the customized locale for GNU C Library that I prefer.
+
+## Reason for existing
+To practice with locales, as well as make the default date stamps more sane (I'm looking at you, Thunar!).
+
+## Alternatives
+Use `en_US` like the majority of the systems in this great nation.
+
+## Dependencies
+Glibc. The internationalization of other C libraries is undetermined, but also not important for my use case.
+
+Package recipes are available for [rpm](locale-en_BS.spec) and [dpkg](debian/rules).
+
+## Installing
+
+### Rpm
+Visit the [copr package](https://copr.fedorainfracloud.org/coprs/bgstack15/stackrpms/package/locale-en_BS/).
+
+### Dpkg
+Visit the [obs package](https://build.opensuse.org/package/show/home:bgstack15/locale-en-bs).
+
+### Manual
+The `en_BS` file is the bare locale file. You can use it in your own GNU environment by manually compiling it and setting your system to use it.
+
+Compile the file to the default location (requires root).
+
+ sudo localedef -i en_BS -f UTF-8 en_BS.UTF-8
+
+Now the locale is available to use, until the next time glibc is updated. Use the packages for persistence. To use the locale, you can do this on Devuan:
+
+ sudo update-locale LC_TIME=en_BS
+
+Or this on Fedora:
+
+ sudo localectl set-locale LC_TIME=en_BS
+
+Or alternatively:
+
+ echo 'export LC_TME=en_BS.utf8' | sudo tee -a /etc/environment
+
+## References
+
+### Weblinks
+1. `en_RU` project: [Readme](https://en-ru.sourceforge.io/en.html) and main [Sourceforge page](https://sourceforge.net/projects/en-ru/)
+2. [customization - How can I customize a system locale? - Ask Ubuntu](https://askubuntu.com/questions/21316/how-can-i-customize-a-system-locale/162714#162714)
+3. [Set custom locales in Gnome3 (on Fedora 20) - Unix &amp; Linux Stack Exchange](https://unix.stackexchange.com/questions/136920/set-custom-locales-in-gnome3-on-fedora-20)
+4. [command line - How can I change the default date format (using LC_TIME)? - Ask Ubuntu](https://askubuntu.com/questions/1064167/how-can-i-change-the-default-date-format-using-lc-time)
+
+### Man pages
+`localedef(1)`
+`update-locale(8)`
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..32620f0
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,5 @@
+locale-en-bs for Devuan
+
+After installing, you can set the LC_TIME to en_BS.utf8
+
+ -- B. Stack <bgstack15@gmail.com> Sat, 05 Mar 2022 10:57:10 -0500
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..765e4be
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+locale-en-bs (0.0.1-1) obs; urgency=low
+
+ * Initial release. Closes: packages-want#15
+
+ -- B. Stack <bgstack15@gmail.com> Sat, 05 Mar 2022 10:57:10 -0500
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..ccf4818
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,19 @@
+Source: locale-en-bs
+Section: localization
+Priority: optional
+Maintainer: B. Stack <bgstack15@gmail.com>
+Build-Depends: debhelper-compat (= 12)
+Standards-Version: 4.5.0
+Homepage: https://bgstack15.ddns.net/
+
+Package: locale-en-bs
+Architecture: all
+Multi-Arch: foreign
+# Binary programs in postinst, prerm come from these packages
+Depends: ${misc:Depends}, ${shlibs:Depends},
+ libc-bin,
+ locales
+Description: glibc locale for Stackrpms
+ This en_BS locale fixes the en_US timestamps to make
+ more sense. This is intended for internal use at
+ Stackrpms locations.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..5f2ad27
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,26 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: locale-en-bs
+Upstream-Contact: B. Stack <bgstack15@gmail.com>
+Source: https://bgstack15.ddns.net/
+
+Files: en_BS
+ locale-en_BS.spec
+ debian/*
+Copyright: 2022, B. Stack <bgstack15@gmail.com>
+License: GPL-3
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 3 can be found in the file
+ `/usr/share/common-licenses/GPL-3'.
diff --git a/debian/locale-en-bs.dsc b/debian/locale-en-bs.dsc
new file mode 100644
index 0000000..a8d4404
--- /dev/null
+++ b/debian/locale-en-bs.dsc
@@ -0,0 +1,14 @@
+Format: 3.0 (quilt)
+Source: locale-en-bs
+Binary: locale-en-bs
+Architecture: all
+Version: 0.0.1-1
+Maintainer: B. Stack <bgstack15@gmail.com>
+Homepage: https://bgstack15.ddns.net/
+Standards-Version: 4.5.0
+Build-Depends: debhelper-compat (= 12)
+Package-List:
+ locale-en-bs deb localization optional arch=all
+Files:
+ 00000000000000000000000000000000 1 locale-en-bs.orig.tar.gz
+ 00000000000000000000000000000000 1 locale-en-bs.debian.tar.xz
diff --git a/debian/locale-en-bs.install b/debian/locale-en-bs.install
new file mode 100644
index 0000000..9faa35c
--- /dev/null
+++ b/debian/locale-en-bs.install
@@ -0,0 +1 @@
+en_BS usr/share/i18n/locales
diff --git a/debian/locale-en-bs.postinst b/debian/locale-en-bs.postinst
new file mode 100644
index 0000000..5ff1e25
--- /dev/null
+++ b/debian/locale-en-bs.postinst
@@ -0,0 +1,28 @@
+#!/bin/sh
+# Reference:
+# https://askubuntu.com/questions/21316/how-can-i-customize-a-system-locale
+set -e
+
+fix1() {
+ grep -qe 'en_BS UTF-8' $1 || echo 'en_BS UTF-8' >> $1
+ grep -qe 'en_BS.UTF-8 UTF-8' $1 || echo 'en_BS.UTF-8 UTF-8' >> $1
+}
+
+case "$1" in
+ configure|abort-upgrade|abort-remove|abort-deconfigure)
+ localedef --quiet --force --inputfile /usr/share/i18n/locales/en_BS --charmap UTF-8 en_BS.utf8
+ fix1 /usr/share/i18n/SUPPORTED
+ fix1 /etc/locale.gen
+ locale-gen
+ update-locale LC_TIME=en_BS
+ ;;
+
+ *)
+ echo "postinst called with unknown argument '\$1'" 1>&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/locale-en-bs.prerm b/debian/locale-en-bs.prerm
new file mode 100644
index 0000000..72c2729
--- /dev/null
+++ b/debian/locale-en-bs.prerm
@@ -0,0 +1,30 @@
+#!/bin/sh
+set -e
+
+fix1() {
+ grep -qE 'en_BS' $1 && sed -i -r -e '/en_BS/d' $1
+}
+
+case "${1}" in
+ remove|deconfigure)
+ localedef --quiet --delete-from-archive en_US.utf8
+ fix1 /usr/share/i18n/SUPPORTED
+ fix1 /etc/locale.gen
+ locale-gen
+ ;;
+
+ upgrade)
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument '\$1'" 1>&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..4a97dfa
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+# You must remove unused comment lines for the released package.
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..9cf3a86
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,9 @@
+#!/usr/bin/make -f
+# You must remove unused comment lines for the released package.
+#export DH_VERBOSE = 1
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+%:
+ dh $@
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/local-options b/debian/source/local-options
new file mode 100644
index 0000000..00131ee
--- /dev/null
+++ b/debian/source/local-options
@@ -0,0 +1,2 @@
+#abort-on-upstream-changes
+#unapply-patches
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..76575dc
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+# You must remove unused comment lines for the released package.
+version=3
diff --git a/locale-en_BS.spec b/locale-en_BS.spec
index 398bb77..3c63411 100644
--- a/locale-en_BS.spec
+++ b/locale-en_BS.spec
@@ -27,8 +27,9 @@ Requires(preun): %{_localesdir}
BuildArch: noarch
%description
-This is a glibc locale for Stackrpms internal use. It modifies the time
-formats to make more sense than en_US.
+This en_BS locale fixes the en_US timestampes to make
+more sense. This is intended for internal use at
+Stackrpms locations.
%install
%{__install} -d %{buildroot}%{_localesdir} -m0755
bgstack15