Makefile 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. #
  2. # Copyright (C) 2007-2012 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=util-linux
  9. PKG_VERSION:=2.21.2
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.21
  13. PKG_MD5SUM:=54ba880f1d66782c2287ee2c898520e9
  14. PKG_LICENSE:=GPLv2 LGPLv2.1 BSD-3c
  15. PKG_LICENSE_FILES:=COPYING getopt/COPYING libblkid/COPYING libmount/COPYING Documentation/licenses/COPYING.GPLv2 Documentation/licenses/COPYING.LGPLv2.1 libuuid/COPYING Documentation/licenses/COPYING.BSD-3
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_BUILD_DEPENDS:=libncurses
  18. PKG_FIXUP:=autoreconf
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/util-linux/Default
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. URL:=http://www.kernel.org/pub/linux/utils/util-linux/
  24. endef
  25. CONFIGURE_ARGS += \
  26. --enable-new-mount \
  27. --with-ncurses \
  28. --disable-nls \
  29. --disable-tls \
  30. --without-udev
  31. TARGET_CFLAGS += $(FPIC)
  32. define Build/InstallDev
  33. $(MAKE) -C $(PKG_BUILD_DIR) \
  34. BUILDCC="$(HOSTCC)" \
  35. DESTDIR="$(1)" \
  36. installdirs install-data
  37. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  38. $(CP) $(PKG_BUILD_DIR)/libblkid/blkid.pc $(1)/usr/lib/pkgconfig
  39. $(CP) $(PKG_BUILD_DIR)/libmount/mount.pc $(1)/usr/lib/pkgconfig
  40. $(CP) $(PKG_BUILD_DIR)/libuuid/uuid.pc $(1)/usr/lib/pkgconfig
  41. $(INSTALL_DIR) $(1)/usr/include/blkid
  42. $(CP) $(PKG_BUILD_DIR)/libblkid/src/blkid.h $(1)/usr/include/blkid
  43. $(INSTALL_DIR) $(1)/usr/include/libmount
  44. $(CP) $(PKG_BUILD_DIR)/libmount/src/libmount.h $(1)/usr/include/libmount
  45. $(INSTALL_DIR) $(1)/usr/include/uuid
  46. $(CP) $(PKG_BUILD_DIR)/libuuid/src/uuid.h $(1)/usr/include/uuid
  47. $(INSTALL_DIR) $(1)/usr/lib
  48. $(CP) $(PKG_BUILD_DIR)/libblkid/src/.libs/libblkid.{a,so*} $(1)/usr/lib
  49. $(CP) $(PKG_BUILD_DIR)/libmount/src/.libs/libmount.{a,so*} $(1)/usr/lib
  50. $(CP) $(PKG_BUILD_DIR)/libuuid/src/.libs/libuuid.{a,so*} $(1)/usr/lib
  51. endef
  52. define Package/libblkid
  53. $(call Package/util-linux/Default)
  54. DEPENDS:=+libuuid
  55. TITLE:=block device id library
  56. SECTION:=libs
  57. CATEGORY:=Libraries
  58. endef
  59. define Package/libblkid/description
  60. The libblkid library is used to identify block devices (disks) as to their
  61. content (e.g. filesystem type, partitions) as well as extracting additional
  62. information such as filesystem labels/volume names, partitions, unique
  63. identifiers/serial numbers...
  64. endef
  65. define Package/libmount
  66. $(call Package/util-linux/Default)
  67. DEPENDS:=+libblkid
  68. TITLE:=mount library
  69. SECTION:=libs
  70. CATEGORY:=Libraries
  71. endef
  72. define Package/libmount/description
  73. The libmount library is used to parse /etc/fstab, /etc/mtab and
  74. /proc/self/mountinfo files, manage the mtab file, evaluate mount options...
  75. endef
  76. define Package/libuuid
  77. $(call Package/util-linux/Default)
  78. TITLE:=DCE compatible Universally Unique Identifier library
  79. SECTION:=libs
  80. CATEGORY:=Libraries
  81. endef
  82. define Package/libuuid/description
  83. The UUID library is used to generate unique identifiers for objects
  84. that may be accessible beyond the local system. This library
  85. generates UUIDs compatible with those created by the Open Software
  86. Foundation (OSF) Distributed Computing Environment (DCE) utility.
  87. endef
  88. define Package/agetty
  89. $(call Package/util-linux/Default)
  90. TITLE:=alternative Linux getty
  91. SUBMENU=Terminal
  92. endef
  93. define Package/agetty/description
  94. agetty opens a tty port, prompts for a login name and invokes the
  95. /bin/login command
  96. endef
  97. define Package/blkid
  98. $(call Package/util-linux/Default)
  99. TITLE:=locate/print block device attributes
  100. DEPENDS:= +libblkid
  101. SUBMENU=disc
  102. endef
  103. define Package/blkid/description
  104. The blkid program is the command-line interface to working with the libblkid
  105. library.
  106. endef
  107. define Package/cal
  108. $(call Package/util-linux/Default)
  109. TITLE:=display a calendar
  110. DEPENDS:= +libncurses
  111. endef
  112. define Package/cal/description
  113. cal displays a simple calendar
  114. endef
  115. define Package/cfdisk
  116. $(call Package/util-linux/Default)
  117. TITLE:=display or manipulate disk partition table
  118. DEPENDS:= +libblkid +libncurses
  119. SUBMENU:=disc
  120. endef
  121. define Package/cfdisk/description
  122. cfdisk is a curses-based program for partitioning any hard disk drive
  123. endef
  124. define Package/dmesg
  125. $(call Package/util-linux/Default)
  126. TITLE:=print or control the kernel ring buffer
  127. endef
  128. define Package/dmesg/description
  129. dmesg is used to examine or control the kernel ring buffer
  130. endef
  131. define Package/fdisk
  132. $(call Package/util-linux/Default)
  133. TITLE:=manipulate disk partition table
  134. DEPENDS:= +libblkid
  135. SUBMENU=disc
  136. endef
  137. define Package/fdisk/description
  138. a menu-driven program for creation and manipulation of partition tables
  139. endef
  140. define Package/findfs
  141. $(call Package/util-linux/Default)
  142. TITLE:=find a filesystem by label or UUID
  143. DEPENDS:= +libblkid
  144. SUBMENU=disc
  145. endef
  146. define Package/findfs/description
  147. findfs will search the disks in the system looking for a filesystem which has
  148. a label matching label or a UUID equal to uuid
  149. endef
  150. define Package/flock
  151. $(call Package/util-linux/Default)
  152. TITLE:=manage locks from shell scripts
  153. endef
  154. define Package/flock/description
  155. manages flock locks from within shell scripts or the command line
  156. endef
  157. define Package/getopt
  158. $(call Package/util-linux/Default)
  159. TITLE:=parse command options (enhanced)
  160. endef
  161. define Package/getopt/description
  162. getopt is used to break up (parse) options in command lines for easy parsing
  163. by shell procedures, and to check for legal options
  164. endef
  165. define Package/hwclock
  166. $(call Package/util-linux/Default)
  167. TITLE:=query or set the hardware clock
  168. endef
  169. define Package/hwclock/description
  170. hwclock is a tool for accessing the Hardware Clock
  171. endef
  172. define Package/logger
  173. $(call Package/util-linux/Default)
  174. TITLE:=a shell command interface to the syslog system log module
  175. endef
  176. define Package/logger/description
  177. logger makes entries in the system log, it provides a shell command interface
  178. to the syslog system log module
  179. endef
  180. define Package/look
  181. $(call Package/util-linux/Default)
  182. TITLE:=display lines beginning with a given string
  183. endef
  184. define Package/look/description
  185. look utility displays any lines in file which contain string
  186. endef
  187. define Package/losetup
  188. $(call Package/util-linux/Default)
  189. TITLE:=set up and control loop devices
  190. endef
  191. define Package/losetup/description
  192. losetup is used to associate loop devices with regular files or block devices,
  193. to detach loop devices and to query the status of a loop device
  194. endef
  195. define Package/lsblk
  196. $(call Package/util-linux/Default)
  197. TITLE:=list block devices
  198. DEPENDS:= +libblkid
  199. SUBMENU=disc
  200. endef
  201. define Package/lsblk/description
  202. lsblk lists information about all or the specified block devices
  203. endef
  204. define Package/mcookie
  205. $(call Package/util-linux/Default)
  206. TITLE:=generate magic cookies for xauth
  207. endef
  208. define Package/mcookie/description
  209. mcookie generates a 128-bit random hexadecimal number for use with the X
  210. authority system
  211. endef
  212. define Package/mount-utils
  213. $(call Package/util-linux/Default)
  214. TITLE:=related (u)mount utilities
  215. DEPENDS+= +libmount
  216. endef
  217. define Package/mount-utils/description
  218. contains: mount, umount, findmnt
  219. endef
  220. define Package/namei
  221. $(call Package/util-linux/Default)
  222. TITLE:=follow a pathname until a terminal point is found
  223. endef
  224. define Package/namei/description
  225. namei uses its arguments as pathnames to any type of Unix file (symlinks,
  226. files, directories, and so forth)
  227. endef
  228. define Package/rename
  229. $(call Package/util-linux/Default)
  230. TITLE:=rename files
  231. endef
  232. define Package/rename/description
  233. rename will rename the specified files by replacing the first occurrence of
  234. expression in their name by replacement
  235. endef
  236. define Package/partx-utils
  237. $(call Package/util-linux/Default)
  238. TITLE:=inform kernel about the presence and numbering of on-disk partitions
  239. DEPENDS:= +libblkid
  240. SUBMENU=disc
  241. endef
  242. define Package/partx-utils/description
  243. contains partx, addpart, delpart
  244. endef
  245. define Package/script-utils
  246. $(call Package/util-linux/Default)
  247. TITLE:=make and replay typescript of terminal session
  248. SUBMENU=Terminal
  249. endef
  250. define Package/script-utils/description
  251. contains: script, scriptreplay
  252. endef
  253. define Package/setterm
  254. $(call Package/util-linux/Default)
  255. TITLE:=set terminal attributes
  256. DEPENDS:= +libncurses
  257. SUBMENU:=Terminal
  258. endef
  259. define Package/setterm/description
  260. setterm writes to standard output a character string that will invoke the
  261. specified terminal capabilities
  262. endef
  263. define Package/sfdisk
  264. $(call Package/util-linux/Default)
  265. TITLE:=partition table manipulator for Linux
  266. SUBMENU=disc
  267. endef
  268. define Package/sfdisk/description
  269. list the size of a partition, list the partitions on a device, check the
  270. partitions on a device and repartition a device
  271. endef
  272. define Package/swap-utils
  273. $(call Package/util-linux/Default)
  274. TITLE:=swap space management utilities
  275. DEPENDS+= +libblkid
  276. SUBMENU:=disc
  277. endef
  278. define Package/swap-utils/description
  279. contains: mkswap, swaplabel, swapon, swapoff
  280. endef
  281. define Package/uuidd
  282. $(call Package/util-linux/Default)
  283. TITLE:=UUID generation daemon
  284. DEPENDS:= +libuuid
  285. endef
  286. define Package/uuidd/description
  287. The uuidd daemon is used by the UUID library to generate universally unique
  288. identifiers (UUIDs), especially time-based UUIDs, in a secure and
  289. guaranteed-unique fashion, even in the face of large numbers of threads
  290. running on different CPUs trying to grab UUIDs.
  291. endef
  292. define Package/uuidgen
  293. $(call Package/util-linux/Default)
  294. TITLE:=create a new UUID value
  295. DEPENDS:= +libuuid
  296. endef
  297. define Package/uuidgen/description
  298. The uuidgen program creates (and prints) a new universally unique identifier
  299. (UUID) using the libuuid library. The new UUID can reasonably be considered
  300. unique among all UUIDs created on the local system, and among UUIDs created on
  301. other systems in the past and in the future.
  302. endef
  303. define Package/wall
  304. $(call Package/util-linux/Default)
  305. TITLE:=send a message to everybody's terminal
  306. SUBMENU=Terminal
  307. endef
  308. define Package/wall/description
  309. wall sends a message to everybody logged in with their mesg permission
  310. set to yes
  311. endef
  312. define Package/whereis
  313. $(call Package/util-linux/Default)
  314. TITLE:=locate the binary, source, and manual page files for a command
  315. endef
  316. define Package/whereis/description
  317. whereis locates source/binary and manuals sections for specified files
  318. endef
  319. define Package/wipefs
  320. $(call Package/util-linux/Default)
  321. TITLE:=wipe a signature from a device
  322. DEPENDS:= +libblkid
  323. SUBMENU:=disc
  324. endef
  325. define Package/wipefs/description
  326. wipefs can erase filesystem, raid or partition table signatures (magic
  327. strings) from the specified device to make the signature invisible for
  328. libblkid.
  329. endef
  330. define Package/libblkid/install
  331. $(INSTALL_DIR) $(1)/usr/lib
  332. $(CP) $(PKG_BUILD_DIR)/libblkid/src/.libs/libblkid.so.* $(1)/usr/lib/
  333. endef
  334. define Package/libmount/install
  335. $(INSTALL_DIR) $(1)/usr/lib
  336. $(CP) $(PKG_BUILD_DIR)/libmount/src/.libs/libmount.so.* $(1)/usr/lib/
  337. endef
  338. define Package/libuuid/install
  339. $(INSTALL_DIR) $(1)/usr/lib
  340. $(CP) $(PKG_BUILD_DIR)/libuuid/src/.libs/libuuid.so.* $(1)/usr/lib/
  341. endef
  342. define Package/agetty/install
  343. $(INSTALL_DIR) $(1)/usr/sbin
  344. $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/agetty $(1)/usr/sbin/
  345. endef
  346. define Package/blkid/install
  347. $(INSTALL_DIR) $(1)/usr/sbin
  348. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/blkid $(1)/usr/sbin/
  349. endef
  350. define Package/cal/install
  351. $(INSTALL_DIR) $(1)/usr/bin
  352. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/cal $(1)/usr/bin/
  353. endef
  354. define Package/cfdisk/install
  355. $(INSTALL_DIR) $(1)/usr/sbin
  356. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/cfdisk $(1)/usr/sbin/
  357. endef
  358. define Package/fdisk/install
  359. $(INSTALL_DIR) $(1)/usr/sbin
  360. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/fdisk $(1)/usr/sbin/
  361. endef
  362. define Package/findfs/install
  363. $(INSTALL_DIR) $(1)/usr/sbin
  364. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findfs $(1)/usr/sbin/
  365. endef
  366. define Package/flock/install
  367. $(INSTALL_DIR) $(1)/usr/bin
  368. $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/flock $(1)/usr/bin/
  369. endef
  370. define Package/getopt/install
  371. $(INSTALL_DIR) $(1)/usr/bin
  372. $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt/getopt $(1)/usr/bin/
  373. endef
  374. define Package/hwclock/install
  375. $(INSTALL_DIR) $(1)/usr/sbin
  376. $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/usr/sbin/
  377. endef
  378. define Package/logger/install
  379. $(INSTALL_DIR) $(1)/usr/bin
  380. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/logger $(1)/usr/bin/
  381. endef
  382. define Package/look/install
  383. $(INSTALL_DIR) $(1)/usr/bin
  384. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/look $(1)/usr/bin/
  385. endef
  386. define Package/losetup/install
  387. $(INSTALL_DIR) $(1)/usr/sbin
  388. $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/losetup $(1)/usr/sbin/
  389. endef
  390. define Package/lsblk/install
  391. $(INSTALL_DIR) $(1)/usr/bin
  392. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/lsblk $(1)/usr/bin/
  393. endef
  394. define Package/mcookie/install
  395. $(INSTALL_DIR) $(1)/usr/bin
  396. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/mcookie $(1)/usr/bin/
  397. endef
  398. define Package/mount-utils/install
  399. $(INSTALL_DIR) $(1)/usr/bin
  400. $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/{u,}mount $(1)/usr/bin/
  401. $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/mountpoint $(1)/usr/bin/
  402. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findmnt $(1)/usr/bin/
  403. endef
  404. define Package/namei/install
  405. $(INSTALL_DIR) $(1)/usr/bin
  406. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/namei $(1)/usr/bin/
  407. endef
  408. define Package/rename/install
  409. $(INSTALL_DIR) $(1)/usr/bin
  410. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/rename $(1)/usr/bin/
  411. endef
  412. define Package/partx-utils/install
  413. $(INSTALL_DIR) $(1)/usr/sbin
  414. $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/.libs/partx $(1)/usr/sbin/
  415. $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/addpart $(1)/usr/sbin/
  416. $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/delpart $(1)/usr/sbin/
  417. endef
  418. define Package/script-utils/install
  419. $(INSTALL_DIR) $(1)/usr/bin
  420. $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/script $(1)/usr/bin/
  421. $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/scriptreplay $(1)/usr/bin/
  422. endef
  423. define Package/setterm/install
  424. $(INSTALL_DIR) $(1)/usr/bin
  425. $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/setterm $(1)/usr/bin/
  426. endef
  427. define Package/sfdisk/install
  428. $(INSTALL_DIR) $(1)/usr/sbin
  429. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/sfdisk $(1)/usr/sbin/
  430. endef
  431. define Package/swap-utils/install
  432. $(INSTALL_DIR) $(1)/usr/sbin
  433. $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/.libs/mkswap $(1)/usr/sbin/
  434. $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/.libs/swaplabel $(1)/usr/sbin/
  435. endef
  436. define Package/uuidd/install
  437. $(INSTALL_DIR) $(1)/usr/sbin
  438. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidd $(1)/usr/sbin/
  439. endef
  440. define Package/uuidgen/install
  441. $(INSTALL_DIR) $(1)/usr/bin
  442. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidgen $(1)/usr/bin/
  443. endef
  444. define Package/wall/install
  445. $(INSTALL_DIR) $(1)/usr/bin
  446. $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/wall $(1)/usr/bin/
  447. endef
  448. define Package/whereis/install
  449. $(INSTALL_DIR) $(1)/usr/bin
  450. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/whereis $(1)/usr/bin/
  451. endef
  452. define Package/wipefs/install
  453. $(INSTALL_DIR) $(1)/usr/sbin
  454. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/wipefs $(1)/usr/sbin/
  455. endef
  456. $(eval $(call BuildPackage,libblkid))
  457. $(eval $(call BuildPackage,libmount))
  458. $(eval $(call BuildPackage,libuuid))
  459. $(eval $(call BuildPackage,agetty))
  460. $(eval $(call BuildPackage,blkid))
  461. $(eval $(call BuildPackage,cal))
  462. $(eval $(call BuildPackage,cfdisk))
  463. $(eval $(call BuildPackage,dmesg))
  464. $(eval $(call BuildPackage,fdisk))
  465. $(eval $(call BuildPackage,findfs))
  466. $(eval $(call BuildPackage,flock))
  467. $(eval $(call BuildPackage,getopt))
  468. $(eval $(call BuildPackage,hwclock))
  469. $(eval $(call BuildPackage,logger))
  470. $(eval $(call BuildPackage,look))
  471. $(eval $(call BuildPackage,losetup))
  472. $(eval $(call BuildPackage,lsblk))
  473. $(eval $(call BuildPackage,mcookie))
  474. $(eval $(call BuildPackage,mount-utils))
  475. $(eval $(call BuildPackage,namei))
  476. $(eval $(call BuildPackage,rename))
  477. $(eval $(call BuildPackage,partx-utils))
  478. $(eval $(call BuildPackage,script-utils))
  479. $(eval $(call BuildPackage,setterm))
  480. $(eval $(call BuildPackage,sfdisk))
  481. $(eval $(call BuildPackage,swap-utils))
  482. $(eval $(call BuildPackage,uuidd))
  483. $(eval $(call BuildPackage,uuidgen))
  484. $(eval $(call BuildPackage,wall))
  485. $(eval $(call BuildPackage,whereis))
  486. $(eval $(call BuildPackage,wipefs))