Makefile 15 KB

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